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

Why is this ruby string casting to_i as 200?

I'm working on a rails app that connects via RestClient to a backend data store (also ruby, not rails). I just added this method to the rails app's backend api class to get a file size from the backend: class Backend < ActiveResource::Base def…
Greg
  • 773
  • 9
  • 22
0
votes
1 answer

Check Linkedin id is valid in Ruby on Rails

I have linkedin Id. I need to check whether it is valid id using rest client or similar to that. I don't want to fetch data or some other stuffs for that id. I need to do this in Ruby on rails. Can anyone please guide me in detail?
Dinesh
  • 45
  • 10
0
votes
1 answer

How do I download and send a file to my user?

I am trying to download a file from a URL and pass it to my user. In order for this to work I need to construct a HTTP GET request like this: https://some.service.com/api/pdf?doc_id=99&data[info1]=some+info&data[info2]=more+info This works fine…
TIM
  • 315
  • 4
  • 14
0
votes
1 answer

Parse rest api content

My rest API returns something like: {"UserInfo":[{"userName":"zbradford","firstName":"Zoe","lastName":"Bradford","emailAddress":"ZBradford@ABC.COM"}]} I would like to let it return only the email address value: ZBradford@ABC.COM Here is my code: …
0
votes
1 answer

ElasticSearch Delete Query

My query is this q = '{ "script":"ctx._source.id = val", "params":{ "val":11316623} }' _id="11316623" response = JSON.parse(RestClient.post("http://mydomain:9200/monitoring/mention_reports/#{_id}/_delete", q)) it gives…
Ravendra Kumar
  • 1,072
  • 10
  • 29
0
votes
1 answer

implement nested restful services(heirarchical structure) in JAVA

I have 3 RESTful services serviceA,serviceB,serviceB. if serviceA has to call serviceB and serviceC, do i have to create clients for them and call them?how do i do that ?I am confused about how that would work..please help(in JAVA)
0
votes
1 answer

Axis2 REST client application with non-Axis2 framework on server side

I need to develop a REST client application that consumes a REST based web service written in some non-Axis2 framework like Apache Slign or Jersey. As far as I can think, this should not be possible as from what I've read from online docs is that…
Amit Sharma
  • 164
  • 1
  • 4
0
votes
0 answers

RestClient.put error in Ruby

I am trying to do a RestClient.put in Ruby for a highchart graphic but I see that this is not replicated. Also first I have a RestClient.post and works fine but the problem is then with the put. At the end I want to manage an exception because the…
0
votes
3 answers

Why does it say I have the wrong number of arguments with RestClient Delete Method?

I have been using RestClient to call the API, so here I am calling the DELETE method to delete one image: @mposter_D = params[:mposter_D] @mid_D = params[:mid_D] req = Hash.new req['mov'] = @mid_D puts "....#{req.to_json}" resource_pos =…
0
votes
1 answer

Yahoo Boss return more than 50 results

I am sending queries to my RESTclient for example url = "http://yboss.yahooapis.com/ysearch/web?q="Yorkshire%20Capital"ANDfraud&format=xml&abstract=long" and I am noticing that there is a maximum of 50 results being returned each time. How can I…
user2405920
  • 69
  • 2
  • 6
0
votes
0 answers

Using Rest-Client Gem To Provide Timing Details Of Http Requests?

I use the "rest-client" gem to create tests for my API calls. However, I would like to get lower level details about the timing of the HTTP request. In particular, I am interested in knowing exactly how long the server processing takes, independent…
Jonah
  • 15,806
  • 22
  • 87
  • 161
0
votes
1 answer

How to read data in response of POST operation using jersey client (RestFull)

In my java client application, I am accessing a endpoint URL and could able to get response back, but it is in HTML code!. Method : Post resource.accept(MediaType.APPLICATION_JSON_TYPE); WebResource resource = Client.create().resource( …
Kodaganti
  • 209
  • 1
  • 8
  • 20
0
votes
1 answer

LinkedIn Share API using RestClient

I am trying to post a Share to LinkedIn using OAuth v2 - I have got authorisation correctly and have the appropriate access keys. Posting to: https://api.linkedin.com/v1/people/~/shares?oauth2_access_token=(access token) Share XML: >
Caffeine Junkie
  • 93
  • 1
  • 1
  • 8
0
votes
0 answers

HTTP Request Login to Facebook

I am trying ruby's rest-client gem to send a login post to Facebook. This is my code, but I can't get logged in to Facebook via Rest Client. require 'rest-client' response = RestClient.post 'https://www.facebook.com/login.php', { :params => { …
Yagiz
  • 1,033
  • 2
  • 21
  • 47
0
votes
2 answers

Yii framework - Image Upload Using Rest Client

I am new to Yii framework. In my project I have a controller called "UserController" and also have the associated model "User" and related View files created using Gii. On the "/user/create" page I am uploading user profile picture. Its all working…
Prazi
  • 335
  • 1
  • 5
  • 18