Method: APIClientBuilder::PostRequest#response
- Defined in:
- lib/api_client_builder/post_request.rb
#response ⇒ JSON
Yields the response body if the response was successful. Will call the response handlers if there was not a successful response.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/api_client_builder/post_request.rb', line 7 def response response = response_handler.post_request(@body) if response.success? response else error_handlers.each do |handler| handler.call(response, self) end end end |