Skip to content

Instantly share code, notes, and snippets.

@johnwake
Last active January 3, 2016 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnwake/8453320 to your computer and use it in GitHub Desktop.
Save johnwake/8453320 to your computer and use it in GitHub Desktop.
response error return
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