From 257ad85e6b2cb00dfafa3c41be29261affcb82d5 Mon Sep 17 00:00:00 2001 From: thefosk Date: Wed, 8 Jan 2014 19:06:31 -0800 Subject: [PATCH] readme --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 530df99..9df478f 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ $response->raw_body; // Unparsed body ### File Uploads -To upload files in a multipart form representation simply place an `@` symbol before the path: +To upload files in a multipart form representation use the return value of `Unirest::file($path)` as the value of a parameter: ```php $response = Unirest::post("http://httpbin.org/post", array( "Accept" => "application/json" ), @@ -75,8 +75,6 @@ $response = Unirest::post("http://httpbin.org/post", array( "Accept" => "applica ) ); ``` - - Use the value of `Unirest::file($path)` to assign a file to a parameter. ### Custom Entity Body Sending a custom body such as a JSON Object rather than a string or form style parameters we utilize json_encode for the body: