Reputation: 6870
I want to send parameters with a POST
request using the RestClient gem (but I don't want to pass the params as JSON).
In a GET
request, I would have:
url = "http://example.com?param1=foo¶m2=bar"
RestClient.get url
How can I pass the same params but in a POST
request without passing a JSON ?
Upvotes: 2
Views: 4070
Reputation: 9268
Read ReadMe file of Rest-client git, it has lots of examples showing different types of request.
For your answer, try :
url = "http://example.com"
RestClient.post url,:param1=>foo, :param2=>bar
Upvotes: 2