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

java.lang.NullPointerException at org.apache.wink.common.internal.utils.FileLoader.loadFileUsingClassLoaders

I am trying to run integration tests on my scim restful server implementation via an embedded jetty server and apache wink REST Client but failing to run the tests. Here is my EmbeddedServerBase class package org.picketlink.test.scim; import…
0
votes
1 answer

Simplify access to controller and action in my ruby script

I have a script(script/seed.rb), working with SCV file. I want to use "update_my_controller_name_path" helper instead of "localhost:3000/update". A simple helpers, such as "root_path" and etc. didn't work. The question is how can I simply get some…
ilyabyar
  • 5
  • 4
0
votes
1 answer

REST Client returns HTTP response code: 401

Thanks for your time! Setup: I've written a JAVA REST client which authenticates (with username/password) and returns a JSON. Problem: This is the exception that I'm getting: Exception in thread "main" java.io.IOException: Server returned HTTP…
Dark Knight
  • 503
  • 2
  • 12
  • 25
0
votes
1 answer

How to attach a file (file upload)in RestClient 2.0.3 plugin

I am trying to upload a file using restclient 2.0.3 plugin, I tried using content-disposition ,but here i have to paste the file content , My requirement is if i specify the path , it should take the content . Do any one know , how to upload the…
Manojkumar
  • 96
  • 5
0
votes
1 answer

How to implement a server for android Restful client application?

I want to develop an android REST client application. I watched this video (https://www.youtube.com/watch?v=xHXn3Kg2IQE). I don't know about implementing a web server and organizing data in the server and performing CRUD operations on the data from…
ashokgujju
  • 320
  • 2
  • 4
  • 17
0
votes
1 answer

jQuery Rest Service Call is not working

We have our own Rest Webservices which returns JSON and we are able to consume(GET) data from browser as well as browser based rest client. We have created a rest client which is JQuery (embeded in html) based and it is not able to even hit the…
Dynamic Meta
  • 71
  • 13
0
votes
1 answer

Missing URI element. For link operations, URI element must be specified

I am trying to create links b/w Products(ID =1 and ID =2) and Category(ID=12) using the OData service- http://services.odata.org/(S(egpbfjhhvili4slwaq1p2lvt))/V2/OData/OData.svc/Categories(12)/$links/Products using the payload:
user3201181
  • 62
  • 1
  • 9
0
votes
0 answers

400 Bad Request in android

I am posting an API on Restclient by GET method. Till Yesterday My response Status code was 200 Ok. But Today I am Getting 400 Bad Request as my response Status Code. Following is response body System.Exception: Failed to deserialize…
user1619306
  • 169
  • 1
  • 5
  • 12
0
votes
2 answers

ruby rest_client put request doesn't work properly

I send PUT request to some service with RestClient gem. I do it like: RestClient.put('http:/app.com/resource/:id.json', { app_token: 'xxx', resource: { status: 'NNN' }}) But the answer JSON is empty (doesn't return what I need). If I send the…
0
votes
0 answers

ruby method call - include argument if statement is true

Looking for an elegant way to include a method argument if a statement is true. In this case it is a rest-client call, the argument is verify_ssl: FALSE. Below is the code with my last attempt I want to insert verify_ssl if @ignore_cert is TRUE.…
nctiggy
  • 73
  • 9
0
votes
0 answers

How to return human readable http response using Rest-Client in Ruby?

I am just learning the basics of the rest-client gem for ruby and have been submitting various http requests in irb to learn how it works. Is there a way of having the HTTP response body display in a human readable format? Also is there a way to…
Cu1ture
  • 1,273
  • 1
  • 14
  • 29
0
votes
1 answer

How to Inspect/Debug/View etc a request Generated by RestClient?

I have a really weird problem where when i try to access a URL using RestClient it times out. If i access the URL directly from the shell (using curl) it loads fine. I can get to other URLs, like google, via RestClient. Furthermore, if i use…
SharkLaser
  • 713
  • 1
  • 10
  • 19
0
votes
1 answer

ruby rest_client, mimetype not recognized

I have a RestClient that does the following call: RestClient::Request.new( :method => "post", :url => "http://myservice.com/call.json", :payload => {'document[data]' => File.new(e.image.path, 'rb')}, :headers => { :accept =>…
AgostinoX
  • 7,477
  • 20
  • 77
  • 137
0
votes
1 answer

Ignore SSL with rest client and androidannotations

I'm trying to consume a rest api with client and androidannotations. It works perfectly, but when I do an api with an invalid certificate returned me an error. org.springframework.web.client.ResourceAccessException: I/O error:…
alfonsomiranda
  • 102
  • 1
  • 9
0
votes
1 answer

rest-client not caching responses from Heroku

we are running our Ruby on Rails (4.0) application (call it: 'carwow') on Heroku, url is http://www.carwow.co.uk on our controller response we are setting http caching expire with: expires_in XXX.seconds, :public => true Now, let's try running on a…