Fixed issue #102

* Fixed issue #102 with parameter encoding
* Removed duplication of setting user-agent
* Fixed Rubocop offence