Last active
January 3, 2016 10:59
-
-
Save johnwake/8453320 to your computer and use it in GitHub Desktop.
response error return
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ApiRequests | |
def self.post_json_to_url input_url, json_body | |
begin | |
@response = RestClient.post(input_url, json_body, :content_type => 'application/json') | |
rescue Exception => e | |
raise e.response | |
end | |
parse_response_body(@response) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment