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
Your request is simply incorrect. According to RFC 7230 and RFC 2616 the request method token is case-sensitive. So you must use upper-case GET. HTTP servers (and thus HTTP server mockups) should not try to autocorrect invalid requests, but fail with 400 Bad Request.
All right, so what is your suggestion here? Is this a Crystal HTTP::Client issue? should it make sure that the request method is uppercase?
If it remains this way, maybe it should at least warn the user that it's not matching because it's lowercase or something like that? (for the next person who will run into this)
I am building an integration and testing it with WebMock and run into this issue.
given I have this mock:
and this request:
The request is not handled by WebMock, and the reason is that the method comparison is case sensitive: https://github.com/manastech/webmock.cr/blob/master/src/webmock/stub.cr#L66 in this case
"get" == "GET"
I don't have time to fix it now, but I might do it later, using uppercase methods as a workaround now.
The text was updated successfully, but these errors were encountered: