-
Notifications
You must be signed in to change notification settings - Fork 10
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 post functionality to parliament-ruby #79
Add post functionality to parliament-ruby #79
Conversation
Implemented #post on Parliament::Request::BaseRequest + associated tests
# @param [String] body (optional) body of the post request. | ||
# | ||
# @return [Parliament::Response::BaseResponse] a Parliament::Response::BaseResponse object containing all of the data returned from the URL. | ||
def post(params: nil, body: nil) |
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.
Assignment Branch Condition size for post is too high. [21.91/15]
Method has too many lines. [13/10]
# @param [Hash] params (optional) additional URI encoded form values to be added to the URI. | ||
# @param [String] body (optional) body of the post request. | ||
# | ||
# @return [Parliament::Response::BaseResponse] a Parliament::Response::BaseResponse object containing all of the data returned from the URL. |
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.
Line is too long. [146/120]
# | ||
# # url: http://example.com/people/current?limit=10&page=4&lang=en-gb | ||
# | ||
# response = request.post({ limit: 10, page: 4, lang: 'en-gb' }, body: {}.to_json) #=> #<Parliament::Response::BaseResponse ...> |
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.
Line is too long. [136/120]
# response = request.post(body: {}.to_json) #=> #<Parliament::Response::BaseResponse ...> | ||
# | ||
# @example HTTP POST request with URI encoded form values | ||
# request = Parliament::Request::BaseRequest.new(base_url: 'http://example.com/people/current', headers: {'Content': 'application/json', 'Accept': 'application/json'}) |
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.
Line is too long. [175/120]
# Makes an HTTP POST request and process results into a response. | ||
# | ||
# @example HTTP POST request | ||
# request = Parliament::Request::BaseRequest.new(base_url: 'http://example.com/people/123', headers: {'Content': 'application/json', 'Accept': 'application/json'}) |
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.
Line is too long. [171/120]
Implemented #post on Parliament::Request::BaseRequest + associated tests