Skip to content

Commit

Permalink
Merge pull request #51 from hideov/patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
DMcNamara committed Oct 9, 2015
2 parents 6ea22f9 + 31c5ad9 commit 9ed1c45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ The success function receives a response object with 2 properties: status and da

Most apis will return JSON meaning you'll want to parse the data like in the example below:

cordovaHTTP.post("https://google.com/, {
cordovaHTTP.post("https://google.com/", {
id: 12,
message: "test"
}, { Authorization: "OAuth2: token" }, function(response) {
Expand Down Expand Up @@ -120,7 +120,7 @@ The error function receives a response object with 2 properties: status and erro
### get
Execute a GET request. Takes a URL, parameters, and headers. See the [post](#post) documentation for details on what is returned on success and failure.

cordovaHTTP.get("https://google.com/, {
cordovaHTTP.get("https://google.com/", {
id: 12,
message: "test"
}, { Authorization: "OAuth2: token" }, function(response) {
Expand All @@ -132,7 +132,7 @@ Execute a GET request. Takes a URL, parameters, and headers. See the [post](#p
### uploadFile
Uploads a file saved on the device. Takes a URL, parameters, headers, filePath, and the name of the parameter to pass the file along as. See the [post](#post) documentation for details on what is returned on success and failure.

cordovaHTTP.uploadFile("https://google.com/, {
cordovaHTTP.uploadFile("https://google.com/", {
id: 12,
message: "test"
}, { Authorization: "OAuth2: token" }, "file:///somepicture.jpg", "picture", function(response) {
Expand All @@ -144,7 +144,7 @@ Uploads a file saved on the device. Takes a URL, parameters, headers, filePath,
### downloadFile
Downloads a file and saves it to the device. Takes a URL, parameters, headers, and a filePath. See [post](#post) documentation for details on what is returned on failure. On success this function returns a cordova [FileEntry object](http://cordova.apache.org/docs/en/3.3.0/cordova_file_file.md.html#FileEntry).

cordovaHTTP.downloadFile("https://google.com/, {
cordovaHTTP.downloadFile("https://google.com/", {
id: 12,
message: "test"
}, { Authorization: "OAuth2: token" }, "file:///somepicture.jpg", function(entry) {
Expand Down

0 comments on commit 9ed1c45

Please sign in to comment.