Created
November 2, 2012 15:09
-
-
Save tarolandia/4001905 to your computer and use it in GitHub Desktop.
Mandrill API error very useful :/
This file contains 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
req = Net::HTTP::Post.new('/api/1.0/messages/send.json', initheader = {'Content-Type' =>'application/json'}) | |
req.body = @request.to_json | |
http = Net::HTTP.new(@uri.host, @uri.port) | |
http.use_ssl = true | |
response = http.start {|http| http.request(req) } | |
puts "Response #{response.code} #{response.message}: #{response.body}" | |
# => Response 500 Internal Server Error: {"status":"error","code":-100,"name":"GeneralError","message":"An unknown error occurred processing your request. Please try again later."} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment