Kong / unirest-ruby

Unirest in Ruby: Simplified, lightweight HTTP client library.
http://unirest.io/ruby
MIT License
364 stars 83 forks source link

Add ability to customize user-agent string #7

Closed mxlje closed 9 years ago

mxlje commented 10 years ago

Since the user-agent is currently defined as a constant (Unirest::USER_AGENT), there’s no clean way to customize it. This PR adds a method on the Unirest module to override the default string.

Unirest.user_agent("custom_user_agent")
andrhamm commented 9 years ago

:+1:

ahmadnassri commented 9 years ago

needs rebase from master.

mxlje commented 9 years ago

Hope everything is fine now :)