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 not sure where to post it - I encountered it when used pact + pact-mock_service, so, I've decided to post it here.
When you accidentaly forget to specify status response option you can get strange result with Net::HTTP:
Net::HTTPBadResponse:
wrong status line: "HTTP/1.1 0 "
I see such possible solutions:
raise an exception if status is not specified - it would be nice because error message can explicitly say "you forgot the status code" instead of assuming it as 0
or assume it to be 200 - it's the most common expected response code IMO;
The text was updated successfully, but these errors were encountered:
ivan-kolmychek
changed the title
Raise/assume status: 200 if status is not specified?
Raise/assume status code to 200 if status code is not specified?
Jun 2, 2015
ivan-kolmychek
changed the title
Raise/assume status code to 200 if status code is not specified?
Raise/assume status code to be 200 if status code is not specified?
Jun 2, 2015
@bethesque I agree - it's better to explicitly point to this error instead of assuming anything (0 or 200), but I just wanted to present other possible solution I've thought about anyway.
I'm not sure where to post it - I encountered it when used pact + pact-mock_service, so, I've decided to post it here.
When you accidentaly forget to specify
status
response option you can get strange result withNet::HTTP
:I see such possible solutions:
0
200
- it's the most common expected response code IMO;The text was updated successfully, but these errors were encountered: