From fcaed10b5114a26f4c955d62f25550983045a980 Mon Sep 17 00:00:00 2001 From: Stephen Poter Date: Tue, 24 Jan 2017 11:13:05 -0500 Subject: [PATCH] document new 'method' param --- README.md | 5 +++-- index.js | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 466448ca..e05c96f7 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,9 @@ The only React Native http post file uploader with android and iOS background su import Upload from 'react-native-background-upload' const options { - url: 'https://myservice.com/path/to/post' - path: 'file://path/to/file/on/device' + url: 'https://myservice.com/path/to/post', + path: 'file://path/to/file/on/device', + method: 'POST', headers: { 'my-custom-header': 's3headervalueorwhateveryouneed' } diff --git a/index.js b/index.js index 1edfdc7d..b57daad9 100644 --- a/index.js +++ b/index.js @@ -51,6 +51,7 @@ Options object: url: string. url to post to. path: string. path to the file on the device headers: hash of name/value header pairs + method: HTTP method to use. Default is "POST" } Returns a promise with the string ID of the upload. Will reject if there is a connection problem, the file doesn't exist, or there is some other problem.