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

Ruby: Google Drive Authorization Faraday::SSLError

I want to let users access their own Google Drive storage on my application. I have followed Google's instructions on their quick-start website, but I keep getting this error: C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/net/http.rb:923:in…
1
vote
1 answer

How do I test a response from Faraday?

I am writing a Ruby wrapper for a JSON API. I am expecting a specific type of response when a successful post is sent to that endpoint...but I am not sure how to actually get the response. I am using Faraday like this: @connection ||= Faraday.new…
marcamillion
  • 32,933
  • 55
  • 189
  • 380
1
vote
1 answer

How to change OPENSSLDIR on Ubuntu?

I'm trying to do some configuration so that I can use SSL/HTTPS with the Faraday gem in my Ruby on Rails app. I'm following the directions on the Faraday official site, but I'm stuck on a step. I don't know how to change the value of OPENSSLDIR…
kales33
  • 670
  • 8
  • 23
1
vote
0 answers

Custom Omniauth Oauth2 strategy works in dev but not prod

For the life of me, I cannot figure out what is happening here. So I have an app that acts as a single sign on server using Oauth2. I have a client that I added a custom omniauth strategy for, that should authenticate on this server. Everything…
Sean
  • 1,078
  • 14
  • 25
1
vote
1 answer

Keep having to start ElasticSearch on Ubuntu start up

I am using the latest Ubuntu build 15.10 and have gone through the install of ElasticSearch here: https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-service.html However, even after executing the command that adds the service to…
fbelanger
  • 3,522
  • 1
  • 17
  • 32
1
vote
1 answer

Preflight OPTIONS request with Faraday gem

How would I make a preflight request with Faraday? It seems there is a name collision. # Create a connection conn = Faraday.new('http://example.com') # GET request conn.get # => #
Rimian
  • 36,864
  • 16
  • 117
  • 117
1
vote
2 answers

Net::HTTPBadResponse (wrong header line format)

Please help me understand, what i'm doing wrong? I need to make POST request to api from my rails app, i tried to do it firstly with gem "faraday" and then with "net/http". Response from server the same. Account creates, but gives…
Paul Ro
  • 148
  • 1
  • 7
1
vote
3 answers

Forcing Gibbon Gem (or Faraday) to use QuotaGuard Static HTTP proxy on Heroku

Full disclaimer; I'm not a strong Ruby dev, but I am learning quickly :) I've set up a simple Ruby script on a Heroku dyno that listens for calls from our donation platform. When a donation is made, it hits a webhook endpoint within my app, which…
petjb
  • 13
  • 4
1
vote
1 answer

Upload file to S3 using Faraday

I'm trying to upload a file to my S3 bucket. Below I've set up my request with credentials. I'm having trouble deducing what should be in the headers and in the body. The secret acces key is within the signature. What am I missing? def params …
jozwright
  • 99
  • 3
  • 11
1
vote
0 answers

Post request in Ruby with Faraday gem and translated from Python

I'm trying to use the Faraday gem to post a request. I receive credit card information and post it to a URL. But, for some reason, my response is "404". My questions are about the way I get the response, and whether I put the information correctly…
Sungpah Lee
  • 1,003
  • 1
  • 13
  • 31
1
vote
1 answer

Faraday::ConnectionFailed at /auth/facebook/callback getaddrinfo: Name or service not known

My rails app was working fine before but now after I log in from facebook I get this error. I did a google search but nothing worked for me. After loggin in from my app, I get this error
Raaz
  • 1,669
  • 2
  • 24
  • 48
1
vote
0 answers

disable ssl verification on gem active_rest_client

I'm creating a model in Ruby/rails that uses the gem "active-rest_client" (https://github.com/whichdigital/active-rest-client). However my target server only 'speaks' HTTPS with a mismatched SSL cert. So I need to disable SSL verification when I…
pirhac
  • 887
  • 2
  • 8
  • 16
1
vote
0 answers

Mac - Faraday::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

I have tried so many ways to fix this. Only seems to happen when calling https to google api. Faraday.get "https://maps.googleapis.com/" give me: Faraday::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate…
DanielCW
  • 149
  • 1
  • 14
1
vote
1 answer

Faraday::ConnectionFailed Connection refused - connect(2) for "localhost" port 9200

I have add elasticsearch in my rails app, also i have include these gems in my Gemfile: gem "elasticsearch-rails" gem "elasticsearch-model" gem 'ngram' All work fine, but every time when i restart my pc i get this error…
Gregory_ynwa
  • 168
  • 1
  • 3
  • 16
1
vote
2 answers

Rails accessing Desk.com api results in RuntimeError concerning FaradayMiddleware

I was pairing with a coworker, and after writing a feature using the desk.com api, everything was working fine. It was deployed to a staging server, where it too worked fine. However, when I run the code on my local dev machine, when I try to query…