1
0
Fork 0
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:
Julien Kirch 2010-04-12 13:27:00 +02:00
parent 7e1cbfe697
commit 859d471cb1

View file

@ -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!