Class: HttpStub::Configurer::Request::Http::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/http_stub/configurer/request/http/factory.rb

Class Method Summary collapse

Class Method Details

.delete(path, headers = {}) ⇒ Object



22
23
24
# File 'lib/http_stub/configurer/request/http/factory.rb', line 22

def delete(path, headers={})
  HttpStub::Configurer::Request::Http::Basic.new(method: :delete, path: path, headers: headers)
end

.get(path, headers = {}) ⇒ Object



14
15
16
# File 'lib/http_stub/configurer/request/http/factory.rb', line 14

def get(path, headers={})
  HttpStub::Configurer::Request::Http::Basic.new(method: :get, path: path, headers: headers)
end

.multipart(path, model, headers = {}) ⇒ Object



10
11
12
# File 'lib/http_stub/configurer/request/http/factory.rb', line 10

def multipart(path, model, headers={})
  HttpStub::Configurer::Request::Http::Multipart.new(path: path, headers: headers, model: model)
end

.post(path, parameters = {}) ⇒ Object



18
19
20
# File 'lib/http_stub/configurer/request/http/factory.rb', line 18

def post(path, parameters={})
  HttpStub::Configurer::Request::Http::Basic.new(method: :post, path: path, parameters: parameters)
end