Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- url = 'http://someurl'
- request = {"data" => data}.to_json
- response = RestClient.post(url,request,:content_type => :json, :accept => :json)
- curl -XHEAD -H x-auth-user: myusername -H x-auth-key: mykey "url"
- response = RestClient.post(
- url,
- request,
- :content_type => :json, :accept => :json, :'x-auth-key' => "mykey")
- RestClient::Request.execute(
- :method => :get or :post,
- :url => your_url,
- :headers => {key => value}
- )
- params = {id: id, device: device, status: status}
- headers = {myheader: "giorgio"}
- RestClient.put url, params, headers
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement