Keep getting 422, 400 errors sending mp3 file through fetch. detail: "There was an error parsing the body"
What is the best way to add a file to the body. Code snippet does not include body declaration.
Participez à la discussion - ajoutez un commentaire ci-dessous:
Make sure you name input field correctly.
input field has to have a name=“file” attribute as API requires it.
Failed to load resource: the server responded with a status of 422 () RapidAPI.js?9bbf:30
Success: Object
detail: Array(1)
0:
loc: Array(2)
0: “body”
1: “file”
length: 2
[[Prototype]]: Array(0)
msg: “field required”
type: “value_error.missing”
[[Prototype]]: Object
length: 1
[[Prototype]]: Array(0)
[[Prototype]]: Object
What field am I missing??
https://rapidapi.com/tipsters/api/shazam-core/tutorials/shazam-api-tutorial
Hi. Email me or telegraph me. And give me examples of the request.