Skip to content
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

Allow uncommon HTTP methods to support payloads #122

Merged
merged 2 commits into from
Feb 4, 2018

Conversation

arun251
Copy link
Contributor

@arun251 arun251 commented Feb 4, 2018

We use REPORT and other HTTP methods as part of our REST API for their defined semantics. The REPORT method is defined to support a request body. I've refactored isPayloadSupported to explicitly look for the standard HTTP methods that are defined as not supporting request bodies so that uncommon HTTP methods may support request bodies, too.

@codecov
Copy link

codecov bot commented Feb 4, 2018

Codecov Report

Merging #122 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #122   +/-   ##
=======================================
  Coverage   96.32%   96.32%           
=======================================
  Files          10       10           
  Lines        1033     1033           
=======================================
  Hits          995      995           
  Misses         21       21           
  Partials       17       17
Impacted Files Coverage Δ
util.go 89.83% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b61150...3215f5f. Read the comment docs.

@jeevatkm
Copy link
Member

jeevatkm commented Feb 4, 2018

@arun251 Thank you for the PR.

Do you think, is it good to add HTTP verb method for Report like other methods?

@jeevatkm jeevatkm self-assigned this Feb 4, 2018
@jeevatkm jeevatkm added this to the v1.3 Milestone milestone Feb 4, 2018
@arun251
Copy link
Contributor Author

arun251 commented Feb 4, 2018

It would be nice, but I'm equally happy using Execute("REPORT", url).

@jeevatkm jeevatkm merged commit c905657 into go-resty:master Feb 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants