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
3
votes
0 answers

How do you use Connection Pooling with Ruby's Rest Client gem?

I am using RestClient to do some communication with an API in one of my Rails apps. I cannot figure out how to setup connection pooling with this gem. My question is essentially: How do i configure Rest Client to use a connection pool?
SharkLaser
  • 713
  • 1
  • 10
  • 19
3
votes
1 answer

Rails - RestClient Unauthorized (401) Error, user is not recognized for POST request

I am working on a plugin for Redmine and I created a method which sends two HTTP requests (using POST method) to attach a new file to a document. The first request works well (see Webrick console below) Started POST…
Shredator
  • 940
  • 3
  • 17
  • 32
3
votes
0 answers

How to Register Application / Access Token for Magento Rest API

Here is my Consumer Info in Magento admin: I want to get an Access Token and Access Token Secret. How do I get it. I am looking to use RestClient.
MaTya
  • 782
  • 6
  • 11
3
votes
1 answer

Twitter Application Only Auth

I'm trying to get an Application Only Auth token following the steps of this link: https://dev.twitter.com/docs/auth/application-only-auth I'm using Ruby on Rails and Rest Client to make the POST request needed and I'm setting the headers (I think)…
gr33nTHumB
  • 368
  • 2
  • 9
3
votes
1 answer

sending a post request to Rest Client in firefox

i am using Rest Client add on in firefox web browser.I want to test a web service that processes a HTTP POST request and consumes json.How do i test it using Rest Client? If i put a json in the request body i get a *HTTP 415 Unsupported Media Type…
user1946152
  • 375
  • 1
  • 9
  • 24
3
votes
2 answers

rubygems rest-client error message

New Ruby user and I am completely addicted, LOVE it...but...I have hit a roadblock right out of the gate Have read plenty on the Ruby basics/theory/etc Working my way through "Bastards" Ruby Lessons and I am getting error message when trying to use…
3
votes
2 answers

How to capture rest-client requests from a Rails app using Charles Proxy?

Running a Rails application locally, I am able to configure Charles Proxy to show all the request/response details for the app accessible at lvh.me:3000. However I haven't been able to capture the rails app internal http calls to external urls. For…
3
votes
1 answer

Why is my json deserialization failing?

I have the following two objects (which I do not control and can not change): [Serializable] [DataContract] public class AddressContactType : BaseModel { public AddressContactType(); [DataMember] public string AddressContactTypeName {…
Jason
  • 463
  • 1
  • 11
  • 25
3
votes
1 answer

Ruby - Uploading a file using RestClient post

I have a cURL that I am trying to translate into Ruby. the cURL is this: curl -i -k -H "Accept: application/json" -H "Authorization: token" -H "Content-Type: image/jpeg" -H "Content-Length: 44062" --data-binary "gullfoss.jpg"…
Adrian
  • 143
  • 1
  • 4
  • 13
2
votes
2 answers

Indexing nodes in neo4j in python

I'm building a database with tag nodes and url nodes, and the url nodes are connected to tag nodes. In this case if the same url is inserted in to the database, it should be linking to the tag node, rather than creating duplicate url nodes. I think…
jvc
  • 604
  • 2
  • 12
  • 33
2
votes
2 answers

getting SSL_connect ... sslv3 alert handshake failure when using .p12 file ruby

I'm trying to use a p12 file and password to open an https page using RestClient in ruby. p12 = OpenSSL::PKCS12.new(File.read("#{RAILS_ROOT}/file.p12"), "pass") resp = RestClient::Resource.new(url, :ssl_client_key => p12.key).get than I…
Uri Benaya
  • 21
  • 1
  • 2
2
votes
2 answers

How to consume terabytes of data using a Java RESTful client

Please could anyone point me in the right direction on how to design/build a web service client that will consume terabytes of data and perform some computation on the retrieved data? I inherited a project at my new job. The project has been…
2
votes
2 answers

RestClient multipart upload from IO

I am trying to upload data as multipart using RestClient like so: response = RestClient.post(url, io, { :cookies => { 'JSESSIONID' => @sessionid }, :multipart => true, :content_type =>…
Tony R
  • 11,224
  • 23
  • 76
  • 101
2
votes
1 answer

Use fakeweb or webmock to simulate RestClient::GatewayTimeout in Ruby?

I often see RestClient::GatewayTimeout in my application. I'm trying to figure out how to properly test for this, to make sure my application handles it gracefully. The closest thing to this that I see is stub_request(:any,…
randombits
  • 47,058
  • 76
  • 251
  • 433
2
votes
2 answers

http request (using net http or RestClient) inside my rails controller

I have problem creating http request inside my controller action. I used net/http and RestClient but I can't get it to work on my local server url i.e http://localhost:3000/engine/do_process, I always get requesttimeout however It works with other…