-
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
Connection methods #861
Connection methods #861
Conversation
These shared tests uncovered a slight difference in behavior between
This is because MDN says that OPTIONS requests have no body, so I'm comfortable with removing that from |
I'm going to merge the added tests to the existing shared examples in |
The presence of multiple sources for methods with bodies might be due to the parallel work on 0.x and 1.0 branches. We should indeed consolidate them and have a single source of truth (my suggestion would be on the main Faraday module, as they will be available everywhere this way. |
@iMacTia I had to tweak my change because I discovered the constants are used for slightly different purposes.
They're different, but both It's a difference worth noting, but for now I will link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall approved, just a couple of quick comments.
I've changed the only outstanding comment so it's good to go now 👍 |
Fix rubocop issues from #861
So clearly I've never implemented a Proxy or Websocket server (or fully read the MDN links above), but now I think that the |
This adds generic tests for all of the supported request method convenience methods on
Faraday::Connection
, and adds support for TRACE and CONNECT. Both methods were put in theMETHODS_WITH_QUERY
const based on the linked MDN doc pages for each method. The MDN pages state that requests using either method will not have a request body. However, you can override this with Faraday's block syntax.NOTE: the
CONNECT
method was removed in #1104, before it was shipped in a full Faraday release.