Questions tagged [faraday]

Simple, but flexible HTTP client library, with support for multiple backends.

Faraday is an HTTP client lib that provides a common interface over many adapters (such as Net::HTTP) and embraces the concept of Rack middleware when processing the request/response cycle.

271 questions
1
vote
1 answer

Faraday 0.9.1 breaks Balanced gem

I cannot migrate because of this error and after hours of trying I cannot find a fix. rake aborted! NoMethodError: undefined method `register_middleware' for…
Roy Li
  • 511
  • 1
  • 6
  • 14
1
vote
1 answer

Unable to install google-api-client gem latest versions along with appnexusapi gem

I have an application which is using Appnexusapi gem. Now I need to install google-api-client gem(>= 0.8.2) into my application to connect google adx api. But while installing google-api-client I am getting dependency issues with faraday and…
1
vote
1 answer

Curl command works, Faraday Fails on same machine

I've run into an issue where when I run a constructed curl command the server response with a 204 (intended), but when I construct a Faraday object with the same configuration it fails with a 500 error - IIS Missing required parameter The curl…
n0denine
  • 341
  • 2
  • 11
1
vote
0 answers

VCR creates a file but doesn't put anything in it

I am trying to test a parser that uses Faraday with VCR. The test passes the first time and creates an empty cassette. When I run it again it hits the empty cassette and fails. I have tested the parser in the console and it works every time. Here…
Glen
  • 144
  • 1
  • 1
  • 7
1
vote
3 answers

ruby SimpleOAuth error

I am very new to ruby and have some problems using the ruby tumblr api. when executing this very simple test case: #!/usr/bin/env ruby require 'tumblr_client' Tumblr.configure do |config| config.consumer_key = "XXXXXXXXXX" …
Justus1
  • 473
  • 1
  • 4
  • 13
1
vote
0 answers

Paperclip error uploading file through Rails API using Faraday

I'm trying to upload a file to my controller via an api call from another app. I'm using Faraday to make the post request but I'm getting this error: Paperclip::AdapterRegistry::NoHandlerError (No handler found for…
Blake Erickson
  • 755
  • 1
  • 9
  • 28
1
vote
1 answer

How to initialize Faraday with a url of type "http://example.com/something"?

If I do: conn = Faraday.new(url: 'http://example.com/api') do |builder| builder.adapter :httpclint end it removes /api from the base url and conn.host returns "example.com". When I later do: conn.post { |req| req.url '/resource'...} it calls…
Alexander Popov
  • 23,073
  • 19
  • 91
  • 130
1
vote
3 answers

How can I solve these problems I'm having with the stretcher and faraday gems?

On my local machine, I am using elasticsearch, ruby, sinatra and the stretcher gem. I get the following error: faraday.rb:99:in `method_missing': undefined method `load_autoloaded_constants' for # (NoMethodError) The…
user1903663
  • 1,713
  • 2
  • 22
  • 44
1
vote
1 answer

putting binary-data with faraday

I'm trying to use faraday (with default adapter) to put some binary-data to an url. The request I'm trying to do using curl is: curl -X PUT https://your_user_token:@api.80legs.com/v2/urllists/name_of_url_list -H "Content-Type:…
ngw
  • 1,222
  • 1
  • 14
  • 34
1
vote
0 answers

Use cached data by FaradayMiddleware::Caching

I use Faraday for request api. I want to cache response body and use it instead of request for specifed expired time. I found FaradayMiddleware::Caching and I can cache response body, but I do not know how use cache instead of request. API service…
1
vote
0 answers

Faraday::Error::ResourceNotFound in Rails 4 on Heroku

My production server is getting an error when it submits a form. The logs say: Faraday::Error::ResourceNotFound (NOT_FOUND: The requested resource does not exist) Whole error here: http://pastebin.com/8YyWvC93 It's a tough one because it is only…
Mild Fuzz
  • 29,463
  • 31
  • 100
  • 148
1
vote
1 answer

GitHub OAuth authorize request doesn't redirect to Authorize Application page

I've implemented my own classes for handling authorization via OAuth to GitHub using Faraday in Ruby. I've verified that under the following conditions: Not logged into GitHub No token exists for the app that a request for authorization via GET to…
dmulter
  • 2,608
  • 3
  • 15
  • 24
1
vote
0 answers

Faraday can't parse XML response of GET

I'm trying to send GET request with faraday @resp = begin connection.get(path, data) rescue Exception => e [] end if i remove rescue part, i get 17:39:54 web.1 | Completed 500 Internal Server Error in 49ms 17:39:54 web.1 |…
Elmor
  • 4,775
  • 6
  • 38
  • 70
1
vote
1 answer

Parse Faraday Response body as Nokogiri Object

I have considered switching from Mechanize to Faraday, since I am making a lot of requests and it seems to be a lot quicker. What I couldn't find out, however, is if it is possible to parse the response body as an Nokogiri Object. The Mechanize way…
Severin
  • 8,508
  • 14
  • 68
  • 117
1
vote
1 answer

Using Faraday Middleware to cache responses from the GitHub API

I'm trying to setup caching on starred repos, but I can't get faraday_http_cache nor faraday_middleway's response cache to work with Octokit. Octokit.middleware = Faraday::Builder.new do |builder| builder.use Faraday::HttpCache # won't cache the…
alt
  • 13,357
  • 19
  • 80
  • 120