Module: Requests::Sugar

Included in:
Requests
Defined in:
lib/requests/sugar.rb

Instance Method Summary collapse

Instance Method Details

#delete(url, **kwargs) ⇒ Object


17
18
19
# File 'lib/requests/sugar.rb', line 17

def delete(url, **kwargs)
  request('DELETE', url, **kwargs)
end

#get(url, **kwargs) ⇒ Object


5
6
7
# File 'lib/requests/sugar.rb', line 5

def get(url, **kwargs)
  request('GET', url, **kwargs)
end

#head(url, **kwargs) ⇒ Object


21
22
23
# File 'lib/requests/sugar.rb', line 21

def head(url, **kwargs)
  request('HEAD', url, **kwargs)
end

#options(url, **kwargs) ⇒ Object


25
26
27
# File 'lib/requests/sugar.rb', line 25

def options(url, **kwargs)
  request('OPTIONS', url, **kwargs)
end

#patch(url, **kwargs) ⇒ Object


29
30
31
# File 'lib/requests/sugar.rb', line 29

def patch(url, **kwargs)
  request('PATCH', url, **kwargs)
end

#post(url, data: nil, **kwargs) ⇒ Object


9
10
11
# File 'lib/requests/sugar.rb', line 9

def post(url, data: nil, **kwargs)
  request('POST', url, data: data, **kwargs)
end

#put(url, data: nil, **kwargs) ⇒ Object


13
14
15
# File 'lib/requests/sugar.rb', line 13

def put(url, data: nil, **kwargs)
  request('PUT', url, data: data, **kwargs)
end

#trace(url, **kwargs) ⇒ Object


33
34
35
# File 'lib/requests/sugar.rb', line 33

def trace(url, **kwargs)
  request('TRACE', url, **kwargs)
end