Questions tagged [rest-client]

REST Client is an open-source HTTP and REST client for Ruby.

REST Client is an open-source HTTP and REST client for Ruby originally created by Adam Wiggins and now maintained by Andy Brody. It was inspired by Sinatra's micro-framework style of specifying actions: get, put, post, delete.

Github

The code repository and issue tracker can be found on github:

https://github.com/rest-client/rest-client

Resources

940 questions
2
votes
1 answer

Groovy Jira Rest API NoSuchFieldError: defaultRequestContentType

This is my first step working with Jira Rest API and I will only return simple serverInfo Here is my Groovy Script: def jira = new RESTClient(JIRAURL +…
satko43
  • 21
  • 2
2
votes
2 answers

How do you upload a file with rest-client and specify the filename?

I tried the following to upload a file with RestClient, but the resulting POST always uses the file's filename ("testfile.txt") instead of "file_name.txt": RestClient::Resource.new(path, resource_options).post(:transfer => { :path => "file_name.txt"…
readonly
  • 343,444
  • 107
  • 203
  • 205
2
votes
1 answer

Transforming TRestResponse content to TFDJSONDataSets

I am using delphi XE7, and I need help to transform TRestResponse content to TFDJSONDataSets on the client side of a Rest Client application. In the code posted below I need a function in this line: LDataSets := function(sContent)-->transform…
Luiz Alves
  • 2,575
  • 4
  • 34
  • 75
2
votes
1 answer

Add data fields to a rest-client request in Ruby

I am having trouble making a request to the uber api using the rest-client gem. I believe the issue is that I am trying to pass the required information as parameters in the url instead of data field. The example curl request has that parameters…
tylerSF
  • 1,479
  • 2
  • 16
  • 25
2
votes
1 answer

rest-client gem: 401 unauthorized with token

I am using the rest-client gem to try and make a post to my API. The RestClient.post helper requires three arguments to pass headers like that: .post(url, params, headers). Have you tried something more like…
Marklar
  • 1,247
  • 4
  • 25
  • 48
2
votes
1 answer

Sending RESTClient Firefox POST and try the same in node.js

I'm sending the following post with FireFox rest client: POST /WSPublic.asmx HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8 Content-Length: 462 Host: host Connection: close
JosepB
  • 2,205
  • 4
  • 20
  • 40
2
votes
1 answer

Ruby Rest Client sending Escaped JSON

I'm using Sinatra and rest-client to send a JSON payload through and process it (the requests require keypair signatures). However it looks like rest-client is sending escaped JSON through. My RestClient log: RestClient.post uriHere,…
2
votes
1 answer

Twilio error, resource not found when looking up SMS by SID

I'm trying to integrate twilio into my rails app. I want to be able to tell if there are any error messages using a response returned from the 'get' method Twilio's example has this @notification =…
Doug Steinberg
  • 1,122
  • 14
  • 32
2
votes
1 answer

translation from XML to rest-client for POST request

The is the XML request via POST I have to make in order to receive a response: some_id_value
josh p
  • 134
  • 1
  • 3
  • 12
2
votes
2 answers

using Rest client and getting statuscode 406 not acceptable

I'm using RestClient and redirecting the request to external REST webservice (java) as RestRequest. I'm getting HTTP statuscode 'not acceptable' and also the repsonse.content is something like this "The resource cannot be displayed because the file…
mvm_bgm
  • 153
  • 1
  • 11
2
votes
1 answer

Changing gmail Settings with Ruby

I need to configure my gmail account(s) programmatically with Ruby. I checked out the apps api and it looks like the simplest possible solution would be to use ClientLogin for logging in and a simple XML PUT for changing the forwarding setting, for…
Technocrat
  • 205
  • 1
  • 7
2
votes
1 answer

Using RestClient instead of curl -- how do I do that?

I am trying to use RestClient to do the following which is currently in Curl: curl -H "Content-Type: application/json" -X POST --data '{"contacts" : [1111],"text" : "Testing"}' https://api.sendhub.com/v1/messages/?username=NUMBER\&api_key=APIKEY I…
Satchel
  • 16,414
  • 23
  • 106
  • 192
2
votes
3 answers

How to push notification from rest client for testing purpose

Hi I am trying to push the notification from rest client to android app. I am doing like below - URL - https://android.googleapis.com/gcm/send Method - POST Headers - Authorization: my_server_key I always get this message Status Code: 401…
N Sharma
  • 33,489
  • 95
  • 256
  • 444
2
votes
0 answers

dot ('.') in URL is removed when executing Restclient

I am using .net framework 4.0 together with Restsharp. Executing the Restclient for 'normal' URL works fine. But sometimes the URL refers to URLs like 'https://somewhere@xyz.com/RA/and/9g9_AAABizUAAAFIrzQywzU./shipping' . In these cases the '.' in…
Thomas M
  • 31
  • 4
2
votes
0 answers

Delphi rest client does not display special characters

I am working with the rest client components and have noticed they do not seem to display special characters correctly. For example, the star character ☆ is displayed as a question mark ? and I was hoping that there might be an easy solution to fix…
user3839120
  • 113
  • 1
  • 6