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

Issue with json Content type for DeepInsert

I'm trying deepinsert with Json on the service,http://services.odata.org/(S(egpbfjhhvili4slwaq1p2lvt))/V2/OData/OData.svc/Categories with body-- { "d" : { "__metadata":…
user3201181
  • 62
  • 1
  • 9
0
votes
1 answer

RAILS :RESTclient request body

I am trying to use the rest-client library of rails. Can anyone help me understand this code. RestClient::Resource.new(@service_url).put :account => {:db_url => @config_vars['DATABASE_URL']} I know it sends a put REST request, but how is the …
user3242743
  • 1,751
  • 5
  • 22
  • 32
0
votes
1 answer

Ruby rest client gem and Github API

To query the Github API with 'rest_client' I do the following, if I want to search for users in London: require 'rest_client' response = RestClient.get 'https://api.github.com/search/users', {:params => {:q => 'location:london'}} Direct browser…
ajthewebdev
  • 432
  • 2
  • 5
  • 17
0
votes
1 answer

Ruby proxy website images

I have a ruby Sinatra server set up, which looks like this: require 'sinatra' require 'rest-client' url = "http://youtube.com" get '/youtube' do RestClient.get(url) end This approach seems to work fine when the…
Cj1m
  • 805
  • 3
  • 11
  • 26
0
votes
1 answer

YouTrack Import Issues from XML file unexpected API response

I am trying to import issues from XML file to this path: /rest/import/{project}/issues It is giving me error saying with 500 Error Code : userService has not been initialized. It is a Ruby application and I am using RestClient for put request. This…
Gokhan Arik
  • 2,626
  • 2
  • 24
  • 50
0
votes
2 answers

Uploading a file to a S3 Presigned URL

I'm trying to upload a local file to a S3 presigned URL. It should be really straight forward, but looks like I'm missing something. http://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html Example: ENV['RESTCLIENT_LOG'] =…
Akshay Rawat
  • 4,714
  • 5
  • 40
  • 65
0
votes
1 answer

Rest client (Ruby) does not set the cookie when i try to upload a file

require 'rubygems' require 'rest_client' response = RestClient.post "URL", "myfile" => File.new("/path/to/file"), "Cookie" => "Name=michal", "X-SESSION-ID" =>…
Bhuvan
  • 4,028
  • 6
  • 42
  • 84
0
votes
1 answer

How can I specify a branch when creating a file on github via the content API?

I am trying to create a file in a certain branch on github via the API, but don't find a way to set the branch successfully for either getting or creating the file. Here is my method: def self.save_file_to_github access_token, github_user,…
Stan Wiechers
  • 1,962
  • 27
  • 45
0
votes
1 answer

Can Grails app contain REST client and server at the same time?

I am trying to see if the built-in REST functionality that Grails ships with will allow the same Grails app to hit a RESTful API endpoint on another machine (effectively making it the REST client), as well as serving that same API endpoint so that…
AdjustingForInflation
  • 1,571
  • 2
  • 26
  • 50
0
votes
1 answer

how to find facebook page is restricted page using graph api or FQL?

Is it possible to get extra detail about page restriction using Graph API or FQL ? https://www.facebook.com/DUFoodandDrink I'm using app access token and RestClient GEM to get facebook page detail in background. Response for certain page is, { …
0
votes
2 answers

How users can communicate on Lync app in windows 8

I am creating an App in window 8, based on Lync. I want that user can chat with my app through Lync server. I have got the list of contacts of a user who is login in my app. But I am not getting how he can chat with the users those are in his…
anand
  • 1,399
  • 5
  • 23
  • 55
0
votes
1 answer

Laravel Auth::attempt

I am stuck with Auth::attempt for an api. UserController.php $credentials = ['user_email' => $data['email'],'user_password' => md5($data['password'])]; if (Auth::attempt($credentials)) { return…
it'sme
  • 35
  • 1
  • 12
0
votes
1 answer

Android- org.apache.http.ProtocolException: The server failed to respond with a valid HTTP response

I am trying to send a HTTP post request to a REST service through my android app and the client runs as an async task. Here is the client: @Override protected Void doInBackground(Void... params) { String address =…
0
votes
1 answer

Executeasync in the same method

i'm trying to call a restclient in the method including the parsing of data, her's my code which i want to make all of it in the method,any ideas please : public void Convert(object value, Type targetType, object parameter, CultureInfo…
0
votes
2 answers

Ruby equivalent of this curl command

curl -s -XPOST localhost:9200/_bulk --data-binary @filename.json I am looking at RestClient gem and cant figure out how to do this. I need this for making a bulk request to elasticsearch.
rubyprince
  • 17,559
  • 11
  • 64
  • 104