You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using mitmproxy2swagger 0.13.0 to parse .har files generated by HTTP toolkit. I noticed that all the API endpoints showed 200 OK in the examples.
This seems to be because the code tries to parse the response as json (or msgpack)
I tested this also with chrome, to get 404/400 codes in a .har.
Anyway, when the response body isn't json, the default response code of 200 is given. This happened a few times on 400 Bad Request on an API I was testing.
I'm not sure if this works differently with mitmproxy vs chrome, and this certainly isn't a priority for me. I just thought it was worth noting because it tripped me up a little.
The text was updated successfully, but these errors were encountered:
I'm using mitmproxy2swagger 0.13.0 to parse .har files generated by HTTP toolkit. I noticed that all the API endpoints showed
200 OK
in the examples.This seems to be because the code tries to parse the response as json (or msgpack)
mitmproxy2swagger/mitmproxy2swagger/mitmproxy2swagger.py
Lines 291 to 293 in d9abbb5
get_response_body is often
mitmproxy2swagger/mitmproxy2swagger/har_capture_reader.py
Line 104 in d9abbb5
I tested this also with chrome, to get 404/400 codes in a .har.
Anyway, when the response body isn't json, the default response code of 200 is given. This happened a few times on
400 Bad Request
on an API I was testing.I'm not sure if this works differently with mitmproxy vs chrome, and this certainly isn't a priority for me. I just thought it was worth noting because it tripped me up a little.
The text was updated successfully, but these errors were encountered: