Complications with POST request
See original GitHub issueHello,
My colleagues and I are trying to upload videos with react-native-background-upload, but although we can see the progression of the file being uploaded, our API receives a request without the video file or any body.
Does your library supports sending requests with body? Is there a way to send a request with the videos on body instead of using path? Which key can we use to retrieve the video file on our API, if we’re adding the video file via ‘path’.
We are using react-native version 0.44.0 and testing on an iPhone device
Our options:
const uploadOptions = {
url: REQUEST_URL,
path: video.uri,
method: 'POST',
headers: {
‘key’: ‘value’,
},
body: formData,
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
POST - HTTP - MDN Web Docs
The HTTP POST method sends data to the server. The type of the body of the request is indicated by the Content-Type header....
Read more >POST Request problems in JavaScript - jquery - Stack Overflow
I`m working on a project in JavaScript and basically what I want is to send a post request to my server in order...
Read more >Why can't we use POST method for all requests? [closed]
It is known that sensitive information should not be transmitted in GET requests as GET requests will be cached and POST should be...
Read more >Http POST request problems (SOLVED) - Defold Forum
Trying to hook up Defold with the POEditor ( a nifty localization tool). Sending a normal Curl request with the same arguments it...
Read more >GET vs POST - Difference and Comparison | Diffen
GET requests are re-executed but may not be re-submitted to server if the HTML is stored in the browser cache. The browser usually...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@StevePotter thanks for the quick response. Sorry but I don’t see any parameters where I can pass multiple/extra form fields/data or body? For what I understand
this field is the name of the file right?
same issue reported here. https://github.com/Vydia/react-native-background-upload/issues/32 affect both ios and android.