Re: convert Curl with headers -H and -- data to RestClient

Kannan Manickam <kannan@...>
 

RestClient.post "https://api.sendhub.com/v1/messages/?username=NUMBER\&api_key=API", { 'contacts' => [1111], 'text' => 'Testing }.to_json, :content_type => 'application/json'
I hope this works.

On Sep 30, 2014, at 2:24 PM, Timothy Fong <timfong888@...> wrote:

How do I convert the following to Restclient?

curl -H "Content-Type: application/json" -X POST --data '{"contacts" : [1111],"text" : "Testing"}' https://api.sendhub.com/v1/messages/?username=NUMBER\&api_key=APIKEY
 


Join main@rest-client.groups.io to automatically receive all group messages.