faraday Questions
3
Solved
Is there a way to add timeout options in this simple get method?
I am using Faraday 3.3.
Faraday.get(url)
After searching around, I can only apply timeout options after I initiate a connection ...
4
Solved
I'm having issues attempting to upload a file to a web service using Faraday.
My code:
conn = Faraday.new('http://myapi') do |f|
f.request :multipart
end
payload = { :file => Faraday::Upload...
1
I'm using the Oauth2 Gem to connect to a service.
I can receive the authorisation code but when I use that code to retrieve the user token,
I get Faraday::ConnectionFailed (end of file reached):...
Removable asked 17/4, 2014 at 9:42
3
Solved
I am using faraday to handle some requests to an internal API. The API endpoints use a CSRF token, so I am also using faraday-cookie_jar.
For a couple of the API endpoints, they require a :multipa...
5
Solved
Sorry for the title, I'm too frustrated to come up with anything better right now.
I have a class, Judge, which has a method #stats. This stats method is supposed to send a GET request to an api a...
2
I want to send a POST request to an API. Here's my code:
conn = Faraday.new(url: BASE) do |faraday|
faraday.response :logger
faraday.request :url_encoded
faraday.headers['Content-Type'] = 'appl...
Isocracy asked 25/5, 2018 at 7:43
2
Solved
I'm using Circle-Ci and Firebase App Distribution for our Continuous Distribution
Every thing was working perfectly until today I'm receiving the below error:
[10:52:11]: --- Step: firebase_app_dis...
Semifinal asked 9/2, 2021 at 11:19
3
I have a model that looks like this:
class Gist
def self.create(options)
post_response = Faraday.post do |request|
request.url 'https://api.github.com/gists'
request.headers['Authorization'] =...
2
How should I send this JSON in Faraday using the post method with the "application/x-www-form-urlencoded" and "multipart/form-data;" headers?
message = {
"name":"John",
"age":30,
"cars": {
"ca...
Playacting asked 10/1, 2019 at 21:39
1
I've adopted some code which has like 5 or 6 Faraday requests inline and is my first time working with it. I am abstracting out to a module. This is the first time I am using this library and I cur...
2
Solved
Is it safe to reuse Faraday connection objects, or is it better to recreate them every time?
def connection
@connection ||= Faraday.new('http://example.com') do |conn|
conn.request :url_encoded
...
3
Solved
I'm writing tests for my rails application.
I want to see only '.' and '*' symbols, when rspec running.
But I'm watching HTTP logs and don't know how disable them.
Piece of rspec output from my te...
Rosati asked 25/7, 2013 at 12:5
1
I am trying to make a request to the Spingo API. I have made a successful request using Curl, but am trying to use the Faraday gem.
The successful curl request looks like this:
curl -v --url "c...
Actin asked 5/8, 2015 at 17:42
0
I'm using faraday with net-http-persistent adapter to make HTTP requests.
I want to optimise my requests by making them execute asynchronously but as I need a persistent connection I keep getting...
Saree asked 20/4, 2018 at 8:49
3
I recently switched my http client to faraday and everything works as intended. I have the following piece of code to create a connection:
@connection = Faraday.new(:url => base_url) do |farada...
Fanatical asked 16/9, 2014 at 18:8
1
Solved
Currently I am working on rails 4 project, and now I have to link / connect another application (not sso but for accessing API's) say example.com. (Note: example.com uses 3-legged oauth security ar...
Felike asked 20/5, 2016 at 9:13
1
Solved
Struggling a bit with faraday. I would like to know what I actually send to the server. I get the response body, but not access the request body. I found that there is a request.env method, but I c...
1
Solved
I have a method like this:
def make_request(path, params, body)
raise ArgumentError.new('Endpoint not set!') if url.nil?
conditions = {url: url}
conditions[:params] = params unless params.blank...
Aalii asked 17/10, 2015 at 15:45
1
I have Rails API server hosted on Heroku, which makes an asynchronous POST request to a callback url specified in an initial API request by the client.
I have a problem when I try to POST to one o...
Spreader asked 12/11, 2015 at 10:43
1
I am receiving the message #<Faraday::ConnectionFailed> Connection refused - connect(2) after using checkboxes to select items in users/edit.html.erb and pressed save. The items I selected ar...
Biquadrate asked 3/8, 2014 at 4:18
2
I have the following code
conn = Faraday.new(:url => 'http://www.mapquestapi.com') do |faraday|
faraday.response :logger # log requests to STDOUT
faraday.adapter Faraday.default_adapter # mak...
Hightail asked 22/1, 2014 at 12:48
3
Solved
My production server is Ubuntu 12.
I'm using Devise + OmniAuth to handle the Google authentication.
But when Google returns a control to my application I get an error "Network is unreachable".
I as...
Fornax asked 14/8, 2012 at 8:38
1
Solved
Is it possible to set the timeout property of a Faraday transport when creating a Ruby Elasticsearch::Client? There is the scope to pass a block when initializing an Elasticsearch::Transport::Trans...
Nobility asked 10/2, 2014 at 14:10
3
Solved
I've been trying to figure this out all day, and it's driving me crazy.
I have two rails apps, ServerApp and ClientApp. ClientApp gets data from ServerApp through an API, using the Her gem. Everyt...
Caning asked 17/5, 2013 at 1:31
1
I am looking for an example of Faraday Middleware that handles http (status code) errors on requests and additionally network timeouts.
After reading the docs for Faraday and it's middleware it's...
Flair asked 30/12, 2013 at 17:47
1 Next >
© 2022 - 2025 — McMap. All rights reserved.