-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No method for OPTIONS HTTP verb #305
Comments
Unfortunately, Connection already has the |
Perhaps it is a naive assumption but wouldn't it be easier to remap |
I don't want to change an established API to support a rarely used HTTP |
IMHO, this decision should be reconsidered. |
Why is For lower-level library authors that build on top of Faraday, I would |
@mislav |
Your use case is a perfect example when to use |
Now I remember why I don’t like With I’d challenge you to submit a pull request to the In defense of the HTTP verbs are important reserved words for an HTTP library. There are only a few of them and in my opinion, we should support them all as first-class citizens in Faraday 1.0, even if that means breaking things along the way. |
CORS is a very important use case. I would be disappointed if 1.0 ships without OPTIONS as a first class verb. |
I am terribly sorry to bump this, but any agreement on supporting |
I'm still not sold on the idea. What would the current Other methods that we support are verbs: get, post, put, delete. It makes it easy to understand that some action is happening when you call them. |
The argument of "the other methods are verbs" should not matter. They are not methods in Faraday because they are verbs, those method exist because they are HTTP methods. The same should happen for If this is the reason for not having I totally get the concern about breaking the API with And about not using It's still your call (obviously :-) ) to decide to support this or not, but I'd love to change your mind about it, and if it's not going to be supported, that it's for something else other than "options is not a verb". |
+1 @nhocki |
This caught me by surprise today. All of the examples with Perhaps we could document this inconsistency and its |
+1 Why isn't options the same as GET, POST, DELETE? |
Even though I personally agree with @mislav, I can't ignore @sferik opinion and the community feedback. I checked the code and noticed that |
…run_request() method instead of the dynamically-generated method associated with the verb name (Faraday.options is a different thing - see lostisland/faraday#305)
I think |
Good news, everyone! I implemented this by overloading |
Shouldn't it be included in this array?
https://github.com/lostisland/faraday/blob/master/lib/faraday/connection.rb#L137
The text was updated successfully, but these errors were encountered: