I am using Typhoeus gem to execute HTTP requests in my rails Application. The request is as follows.
data = {"auth_token"=>"abcd" ,"employee" => {"method" => "add_employee"}}
header = { "Content-Type" => "application/json","Accept"=>"application/json"}
request = Typhoeus::Request.post("www.example.com",:body=> data.to_json,:headers => header)
here while executing this the auth_token has been converted to auth%5Ftoken=abcd. Actually my API expecting the parameter auth_token. Because of this API is not allowing to access it. It's throwing unauthorized error. Please help me to solve this problem. Thanks in Advance.
I corrected that issue with to_query. Actually to_query is parsing the actual data to the API