-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add missing REST methods to Curl Client (SwiftOtter's SOP-348) #39330
base: 2.4-develop
Are you sure you want to change the base?
Add missing REST methods to Curl Client (SwiftOtter's SOP-348) #39330
Conversation
Hi @lbajsarowicz. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
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.
I added a few comments with possible improvements. Also, I think you forgot to add CONNECT
method.
* @param string $uri | ||
* @return void | ||
*/ | ||
public function delete($uri) |
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.
According to HTTP documentation, DELETE request can include optional payload.
* @param string $uri | ||
* @return void | ||
*/ | ||
public function options($uri) |
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.
According to HTTP documentation, OPTIONS request can include optional payload.
* @param string $uri | ||
* @return void | ||
*/ | ||
public function head($uri) |
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.
According to HTTP documentation, HEAD request can include optional payload.
@ihor-sviziev or @bgorski Can I ask you for Code Review in this specific case? |
@magento create issue |
@magento run all tests |
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.
Hello @lbajsarowicz,
Thanks for the contribution!
It seems this PR has been already reviewed by @michalbiarda. We request you to please address them and also please fix the failed automated tests.
Thanks
@magento run all tests |
@michalbiarda @engcom-Hotel: I have added an optional payload for the DELETE, OPTIONS, and HEAD methods. Additionally, I added the CONNECT method. Please review it. Thanks. cc: @lbajsarowicz |
@magento run all tests |
Description (*)
There are 9 methods in the HTTP protocol (https://en.wikipedia.org/wiki/HTTP).
Magento implements just 2 of them, so when you need to make requests to remote environments using Framework HTTP Client, you end up with HTTP 411 error.
This Pull Request adds missing methods with their payload support:
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)
Resolved issues: