mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
Added HTTP HEAD method to the resources, untested
Conflicts: rest-client.gemspec
This commit is contained in:
parent
ab1c9205af
commit
edb31a626c
1 changed files with 8 additions and 0 deletions
|
@ -54,6 +54,14 @@ module RestClient
|
|||
:headers => headers), &(block || @block))
|
||||
end
|
||||
|
||||
def head(additional_headers={}, &block)
|
||||
headers = (options[:headers] || {}).merge(additional_headers)
|
||||
Request.execute(options.merge(
|
||||
:method => :head,
|
||||
:url => url,
|
||||
:headers => headers), &(block || @block))
|
||||
end
|
||||
|
||||
def post(payload, additional_headers={}, &block)
|
||||
headers = (options[:headers] || {}).merge(additional_headers)
|
||||
Request.execute(options.merge(
|
||||
|
|
Loading…
Add table
Reference in a new issue