Skip to content

Instantly share code, notes, and snippets.

@schappim
Created February 26, 2021 22:36
Show Gist options
  • Save schappim/d0517e192859a2dce189bb61fe80bc61 to your computer and use it in GitHub Desktop.
Save schappim/d0517e192859a2dce189bb61fe80bc61 to your computer and use it in GitHub Desktop.
auth = {:username => "REMOVED", :password => "REMOVED"}
response = HTTParty.get("https://sparkfun.com/distro/products.xml?full_description=0&exclude_retired=1", :basic_auth => auth)
puts response.body
# The response is:
# <html>
# <head><title>504 Gateway Time-out</title></head>
# <body>
# <center><h1>504 Gateway Time-out</h1></center>
# <hr><center>nginx/1.18.0</center>
# </body>
# </html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment