Questions tagged [curb]

Curb provides Ruby-language bindings for the libcurl, a fully-featured client-side URL transfer library.

Curb provides Ruby-language bindings for the libcurl, a fully-featured client-side URL transfer library. See https://github.com/taf2/curb

125 questions
0
votes
1 answer

Collect xml response by third party web service

I have used this command to send xml files to a web service named SRA-ENA. submission_field = Curl::PostField.content(File.read("xml/#{@experiment.alias}.submission.xml"), 'SUBMISSION') study_field =…
A1aks
  • 187
  • 1
  • 2
  • 15
0
votes
1 answer

Parsing Xml response from third party web service

I have installed cURB library for my rails 2 application and I am able to send multiple xml files to a single url of a web service as a post request. In addition to that I receive an receipt from the web service in an xml file which I need to be…
A1aks
  • 187
  • 1
  • 2
  • 15
0
votes
2 answers

curb post over ssl

how can you do a post over https using curb ruby gem? This is how I do it over http to post a file to a server: c = Curl::Easy.new("http://www.myserver.com/upload_messages") c.multipart_form_post = true post_field =…
Pod
  • 928
  • 1
  • 10
  • 30
0
votes
1 answer

Curl::Multi.download is broken?

When I do ruby-1.9.2-p180 :002 > Curl::Multi.download(["http://www.bbc.com"]) => nil The downloaded file is of zero size ls -l -rw-r--r-- 1 staff 0 Jan 5 19:51 www.bbc.com But the same works with…
randomuser
  • 1,858
  • 2
  • 17
  • 21
0
votes
1 answer

Handling connection refused from curb(-fu) call

How can I deal with Curl::Easy.http_get("dev-server.example.com") Curl::Err::ConnectionFailedError: Curl::Err::ConnectionFailedError from a curb or curb-fu call? Our dev servers are up and down so I need to be able to handle this better than…
snick
  • 15
  • 5
0
votes
1 answer

How to upload a csv file from local diretory using Curb library

I have been strugling for a few days to be able and manage file upload with curb library that is the ruby version of curl. The thing that was most worrying and blurry was the : " Curl::PostField.file" part where the documentation is kind of fuzzy at…
user3172824
  • 301
  • 1
  • 2
  • 8
0
votes
1 answer

How to set limit-rate option in Curb gem?

I'd like to set --limit-rate option for downloads done by Curb gem (ruby interface to curl). In curl: curl --limit-rate 10K http://server/large_file.rar For downloads by Curb I have this code (plus progressbar, but that's not relevant to this…
Lukas Stejskal
  • 2,542
  • 19
  • 30
0
votes
0 answers

Ruby - cannot load such file -- curl - Windows 10

The things that i have done so far: Downloaded: rubyinstaller-devkit-3.0.2-1-x86 32bit added C:\Ruby30\bin to Path Downloaded: curl-7.80.0-win32-mingw added C:\curl-7.80.0-win32-mingw\bin to Path I used the following command to install curb: gem…
Forgacs
  • 23
  • 3
0
votes
1 answer

How do I format this GET in curb?

I'm trying to use someone's API to retrieve data. Here's a plain curl GET that works fine: $ curl -H 'Authorization: Bearer eyJhbGciOiJSUz...'…
mpipkorn
  • 153
  • 2
  • 9
0
votes
1 answer

Curl mixing the results in Ruby on Rails

I have the following function in payment.rb def self.create_customer_with_card arg customer_list = Curl.get("#{BaseURL}/customer") do |curl| curl.headers["Authorization"] = authorization_header curl.headers['Content-Type'] =…
Mani
  • 2,391
  • 5
  • 37
  • 81
0
votes
1 answer

curb + mechanize = segfault?

I get the following output from irb (v 0.9.5) when I require mechanize and then curb: $ irb >> require 'mechanize' => true >> require 'curb' => true >> No problems there. However, when I require the libs in the other order, I get the…
peter
  • 161
  • 2
  • 8
0
votes
0 answers

Httpi timeout on PUT but POST works

I am trying to get PUT working with httpi. I am using curb (curl) as my adapter with gss negotiation (I need to use a Kerberos token). I am able to GET the article_to_update and I'm able to POST new articles using almost the exact same code…
Greg Ruhl
  • 1,060
  • 2
  • 9
  • 27
0
votes
1 answer

Ruby curb on Windows: I installed 0.7.12, bundler complains not being able to install 0.7.10

I got this error when calling "bundle update": Installing curb (0.7.10) with native extensions C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:529:in `rescue in block in build_extensions': ERROR: Failed to build gem native …
krn
  • 6,715
  • 14
  • 59
  • 82
0
votes
0 answers

using webmock to mock curb Curl::easy

I have a RoR site using curb, and I currently have the line: - password = Curl::Easy.perform("http://www.dinopass.com/password/simple").body_str I am already including webmock, and I see that it claims that it can mock this case. But I don't see…
Brian Postow
  • 11,709
  • 17
  • 81
  • 125
0
votes
1 answer

How to convert an image string into a stream in Ruby

I use Ruby Gem curb to fetch image by the method of body_str of Curl::Easy instance, then want to use RMagick to process the image, however Magick::Image.read needs a file name to read, but what i get is the content string of the image. Yes, i know…
ywenbo
  • 3,051
  • 6
  • 31
  • 46
1 2 3
8 9