Skip to content

Commit fcaed10

Browse files
committed
document new 'method' param
1 parent bc7f97f commit fcaed10

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ The only React Native http post file uploader with android and iOS background su
5353
import Upload from 'react-native-background-upload'
5454
5555
const options {
56-
url: 'https://myservice.com/path/to/post'
57-
path: 'file://path/to/file/on/device'
56+
url: 'https://myservice.com/path/to/post',
57+
path: 'file://path/to/file/on/device',
58+
method: 'POST',
5859
headers: {
5960
'my-custom-header': 's3headervalueorwhateveryouneed'
6061
}

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Options object:
5151
url: string. url to post to.
5252
path: string. path to the file on the device
5353
headers: hash of name/value header pairs
54+
method: HTTP method to use. Default is "POST"
5455
}
5556
5657
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.

0 commit comments

Comments
 (0)