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

rails 4.2.6 authenticate_or_request_with_http_basic problems in update/put/patch method

Hi guys i have problems with authenticate_or_request_with_http_basic, here is the code: def authenticate puts "here 1" if authenticate_or_request_with_http_basic('Qontak') do |username, password| puts "here 2" @user =…
0
votes
1 answer

API not responding as expected

I've been tasked with rebuilding this javascript file into ruby but I'm getting a response that doesn't make sense (to me) the error is: {"api_error_code"=>1, "message"=>"Parameter 'username_or_email' is required.", "code"=>"API_ERROR",…
Thermatix
  • 2,757
  • 21
  • 51
0
votes
1 answer

Curb gem will not install correctly to use RVM

Installed Ruby 2.2.4 x64 Windows. Installed the correct DevKit. Installing RVM via Windows...Can't becuase I need the curb gem. When I install the curb gem I get an error: I'm trying to install the RVM from this site, using this command as…
marriedjane875
  • 653
  • 2
  • 10
  • 24
0
votes
1 answer

Savon: set SSL ciphers list

I recently upgraded to OS X El Capitan, and now I'm getting the error SSL_connect returned=1 errno=0 state=error: dh key too small. I know this is because the server is using an insecure Diffie Hellman key, but I can't change anything about the…
NJP
  • 815
  • 1
  • 7
  • 20
0
votes
1 answer

Ruby Curb gem - Ubiquiti mPower HTTP API

I am attempting to replicate this HTTP API for Ubiquiti's mPower units using the Curb gem and store the output from this into a CSV file. Using cURL: curl -X POST -d "username=user&password=pass" -b "AIROS_SESSIONID=01234567890123456789012345678901"…
atwalsh
  • 3,622
  • 1
  • 19
  • 38
0
votes
1 answer

Curb gem: How do I get the body as UTF-8?

I'm using the Curb gem (https://github.com/taf2/curb) to get the HTML of a page that has special characters: http = Curl.get("http://www.baidu.com/") puts http.body_str http.body_str.encoding is ASCII-8BIT. How do get the the body_str as UTF-8…
ill_always_be_a_warriors
  • 1,546
  • 2
  • 17
  • 33
0
votes
1 answer

How can i activate --trace-asci debugging with curb/curl for ruby?

Standard curl supports command line option --trace-asci and --trace. Anyone any clues on how to set this option for a Curl::Easy object?
0
votes
2 answers

Using curb (rails gem) to convert a file with convertapi

I'm working on a Rails app to send Word files I have stored on Amazon S3 to convertapi for conversion into PDFs. I'm using the paperclip gem to manage the files, and the curb gem to make the actual request. # model with property has_attached_file…
lostphilosopher
  • 4,361
  • 4
  • 28
  • 39
0
votes
1 answer

how do I POST several values + headers using curb

I tried the following: Ruby: How do I send a JSON POST request using Curb? But I get an error, yet curl works as follows: curl "https://api-sandbox.billforward.net:443/v1/subscriptions/SUB-35F07614-4F6D-4AF2-95EB-F3DB03FE/advance" \ -H…
Satchel
  • 16,414
  • 23
  • 106
  • 192
0
votes
0 answers

get an image and parse it as binary

I'm using curb to get an image like so : curl = Curl::Easy.new("http://www.myimage.com/path/to/my.jpg") curl.perform Now I need to save the returned curl.body_str into the database, which is expecting type binary. The body_str is returned as a…
TheRealJimShady
  • 3,815
  • 4
  • 21
  • 40
0
votes
2 answers

Using curb gem and libcurl on Windows

I am trying to install the curb gem, which is libcurl bindings for Ruby, and of course I need to have "A working (lib)curl installation, with development stuff" installed on my computer. So, I went to the cURL Download Wizard and downloaded this…
picardo
  • 24,530
  • 33
  • 104
  • 151
0
votes
1 answer

trying 'PURGE' varnish using curb

I'm trying to use the 'curb' gem to send a 'PURGE' request to our varnish box, the problem is that It doesn't seem to work. I can't tell if it's failing because it's not been implemented in our varnish box(it's supposed to have been) or because curb…
Thermatix
  • 2,757
  • 21
  • 51
0
votes
1 answer

Curb gem broke my Bundle install

I am making contact form in rails app and when tried to bundle install i got error from gem i never added to gemfile. Some mysterious curb gem lack some libraries or something else. I have looked for answers but can't figure out what they are…
DanielsV
  • 892
  • 1
  • 8
  • 26
0
votes
1 answer

Can't get Curl URL to work inside a Ruby Module Method

I am having a problem where I can't get any of the following methods, (1, 2 and 3) to work. require "curb" @username = 'user' @api_key = 'key' @base_uri = 'https://url.com' @offer_id = 999 @login_method =…
mageofzema
  • 85
  • 7
0
votes
1 answer

How can I scrape a value from HTML?

I'm trying to scrape my apps keys (I replaced them with ".....") then write them into a file to be stored, but Nokogiri can seem to pick up the value of client_id and client_secret in the HTML. Here is the HTML I'm trying to scrape:
marriedjane875
  • 653
  • 2
  • 10
  • 24
1 2 3
8 9