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
0
votes
1 answer

Caused by: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of com.model.user out of START_ARRAY token

I am passing json string from restclient to resteasy webservice for model object user. I have set Content-Type=application/json and my json string in body is as follows, { "id": "100", "email": "email", "add": [ { …
user1660325
  • 747
  • 4
  • 20
  • 35
0
votes
2 answers

Multiple JSON Requests Ruby

Im using rails for with the crunchbase api to pull down the info for companies and I've been battling this error all night. It completes one request successfully and after constructing the second request it crashes and I receive this…
rich
  • 2,136
  • 19
  • 23
0
votes
1 answer

File upload with RestClient.execute and timeout

I am trying to upload a file with the following call RestClient::Request.execute(method: :post, url: Paperclip::Storage::Http::FILE_UPLOAD_LOCATION, password: Paperclip::Storage::Http::FILE_UPLOAD_KEY, timeout: 8, open_timeout: 8, payload:…
Marek Příhoda
  • 11,108
  • 3
  • 39
  • 53
0
votes
1 answer

Using Grails for Web Service Client Project

I'm currently researching on Grails, if it would be a good choice to go with a Web Service client project. It is said Grails is highly beneficial for developing Admin Portals and Prototypes. However my concern is to use Grails for an Admin Portal…
MCF
  • 768
  • 2
  • 6
  • 21
0
votes
1 answer

How can I display my tweet feed with Rest Client and Codeigniter?

I have got all my tweet feed displaying... but it is completly out of format. COuld anyone point me in the right direction for the finishing touches? I have created a tweet model, with the results printing in the controller. But at the minute it is…
Chris Jenks
  • 33
  • 1
  • 6
0
votes
0 answers

Grails : org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoSuchMethodError: org/apache/http/protocol/BasicHttpContext.()V

I'm using grails restclient plugin(':rest:0.7') to consume rest grails rest services. Here is my code: def restClient = new RESTClient(ServiceURL) def httpResponseDecorator = restClient.get(query: requestMessage) pdfData =…
TP_JAVA
  • 1,002
  • 5
  • 23
  • 49
0
votes
2 answers

Ruby rest-client persisting cookies

I am using rest-client gem for communication between my CLI client and server. I am using cookies for persisting HTTP session. @cookies = response.cookies ... RestClient.post( :cookies => @cookies) As you can see from the snippet cookies are…
Haris Krajina
  • 14,824
  • 12
  • 64
  • 81
0
votes
3 answers

json parse error inside a Asyntask in android

I get this error "Sometimes" in my App, I use a Asyntask: 03-19 08:10:05.768: E/AndroidRuntime(280): FATAL EXCEPTION: main 03-19 08:10:05.768: E/AndroidRuntime(280): java.lang.NumberFormatException: unable to parse 'null' as integer 03-19…
Fcoder
  • 9,066
  • 17
  • 63
  • 100
0
votes
1 answer

RESTClient for Firefox - Sending Dict as POST parameter

I am trying to post a request to test my website using RESTClient add-on for firefox. In body, I am passing the following text: ["abcd":"12", "ab":"23"] but in backend (django server), I am getting error while parsing: MultiValueDictKeyError: 'Key…
Anuj
  • 1,160
  • 2
  • 20
  • 40
0
votes
1 answer

Spring controller with @RequestBody and @ModelAttribute for the same parameter

I want to create a controller method that can be called from html form or from a standalone client using resttemplate. The method has this signature: @RequestMapping(method = RequestMethod.POST) public ModelAndView save(@RequestBody…
0
votes
0 answers

Duplicate 'caption' on Facebook OpenGraph feed

The following 'error' started occurring within the past few month or so. Up until then the following Ruby code (using the fantastic rest-client gem): resp = RestClient.post("https://graph.facebook.com/#{userid}/feed", :access_token…
Joe
  • 2,352
  • 20
  • 38
0
votes
1 answer

Download an image from a website into a CouchDB attachment through Rails without local storage?

I'm trying to scrape some websites and store the images as CouchDB attachments. In order to expedite the process I don't want to store the images locally at all. The relevant gems I'm already using are Mechanize, CouchRest Model and rest-client. I'm…
leetheguy
  • 872
  • 10
  • 29
0
votes
0 answers

What happens after limit of connections is reached in a Jetty HttpClient used in an Android app?

I have a client that constantly talks to a server via http using android-annotations's RestClient. Every time the app is open for a long time and lots of requests have been made, new http requests simply timeout with no result and no error from the…
Henrique
  • 4,921
  • 6
  • 36
  • 61
0
votes
3 answers

The easiest way to implement REST API client and JSON parser in Java?

I am struggling at transfering this code from JQuery to Java: var url = 'http://gdata.youtube.com/feeds/api/videos/'; $.getJSON( url + '?v=2&alt=json-in-script&callback=?', { 'q': q, }, function(data) {gotData(q, data);}); function…
Ognjen
  • 2,508
  • 2
  • 31
  • 47
0
votes
2 answers

How to post body in sitebricks-client?

I am using sitebricks-client to interact with REST APIs in Java. I need to do a POST with a non-empty body. How do I do that in sitebricks?
pathikrit
  • 32,469
  • 37
  • 142
  • 221