Class: Tire::HTTP::Client::Faraday

Inherits:
Object
  • Object
show all
Defined in:
lib/tire/http/clients/faraday.rb

Constant Summary collapse

DEFAULT_MIDDLEWARE =

Default middleware stack.

Proc.new do |builder|
  builder.adapter ::Faraday.default_adapter
end

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.faraday_middlewareObject

A customized stack of Faraday middleware that will be used to make each request.



39
40
41
# File 'lib/tire/http/clients/faraday.rb', line 39

def faraday_middleware
  @faraday_middleware
end

Class Method Details

.delete(url, data = nil) ⇒ Object



53
54
55
# File 'lib/tire/http/clients/faraday.rb', line 53

def delete(url, data = nil)
  request(:delete, url, data)
end

.get(url, data = nil) ⇒ Object



41
42
43
# File 'lib/tire/http/clients/faraday.rb', line 41

def get(url, data = nil)
  request(:get, url, data)
end

.head(url) ⇒ Object



57
58
59
# File 'lib/tire/http/clients/faraday.rb', line 57

def head(url)
  request(:head, url)
end

.post(url, data) ⇒ Object



45
46
47
# File 'lib/tire/http/clients/faraday.rb', line 45

def post(url, data)
  request(:post, url, data)
end

.put(url, data) ⇒ Object



49
50
51
# File 'lib/tire/http/clients/faraday.rb', line 49

def put(url, data)
  request(:put, url, data)
end