mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
add a rails-like usage example
This commit is contained in:
parent
7e1cbfe697
commit
859d471cb1
1 changed files with 12 additions and 0 deletions
12
README.rdoc
12
README.rdoc
|
@ -27,6 +27,18 @@ of specifying actions: get, put, post, delete.
|
|||
response.to_str
|
||||
➔ \n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\n \"http://www.w3.org/TR/html4/strict.dtd\">\n\n<html ....
|
||||
|
||||
RestClient.post( url,
|
||||
{
|
||||
:transfer => {
|
||||
:path => '/foo/bar',
|
||||
:owner => 'that_guy',
|
||||
:group => 'those_guys'
|
||||
},
|
||||
:upload => {
|
||||
:file => File.new(path)
|
||||
}
|
||||
})
|
||||
|
||||
== Multipart
|
||||
|
||||
Yeah, that's right! This does multipart sends for you!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue