Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 7 lines (4 sloc) 0.317 kb
d88eeff Added documentation via example of how to send custom user agents
David Fisher authored
1 # To send custom user agents to identify your application to a web service (or mask as a specific browser for testing), send "User-Agent" as a hash to headers as shown below.
2
3 require 'httparty'
4
39e98a7 @k0kubun Remove trailing whitespaces
k0kubun authored
5 APPLICATION_NAME = "Httparty"
5f9eedc @kalmanh Changing symbol syntax inside hashes - take 2
kalmanh authored
6 response = HTTParty.get('http://example.com', headers: {"User-Agent" => APPLICATION_NAME})
Something went wrong with that request. Please try again.