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
It seems like calling GET on the path languages is successful (200), but /languages fails (404). Is this a bug or a feature? Wouldn't it make sense for them to be optionally included (or required based on the API endpoint - whether it has a / at the end or not)?
This is the same example but using Sawyer instead:
http://eval.so/api + languages = http://eval.so/api/languages
http://eval.so/api + /languages = http://eval.so/languages
The initial slash matters. This is by design. It signifies that this URL starts from the root (the same as absolute/relative URLs distinction in hyperlinks)
Note this means that when paths are passed to the connection object (eg for ) they now need to *not* be prefixed by a slash (see [this Github issue](lostisland/faraday#346)).
I moved this issue over from
lostisland/sawyer
as it turns out it is a Faraday issue.Get for instance this Pry session:
It seems like calling
GET
on the pathlanguages
is successful (200
), but/languages
fails (404
). Is this a bug or a feature? Wouldn't it make sense for them to be optionally included (or required based on the API endpoint - whether it has a/
at the end or not)?This is the same example but using Sawyer instead:
The text was updated successfully, but these errors were encountered: