Shazam Core

PAYANT
Par Tipsters CO | Mise à jour 13 days ago | Music
Popularité

9.9 / 10

Latence

1,811ms

Niveau de service

100%

Health Check

100%

Retour à toutes les discussions

Getting javascript fetch 422, 400 errors

Rapid account: Hardboiledartguy
hardboiledartguy
2 years ago

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.

Rapid account: Hardboiledartguy
hardboiledartguy Commented 2 years ago

Make sure you name input field correctly.
input field has to have a name=“file” attribute as API requires it.

Rapid account: Hardboiledartguy
hardboiledartguy Commented 2 years ago

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??

Rapid account: Tipsters
tipsters Commented 2 years ago

Hi. Email me or telegraph me. And give me examples of the request.

Participez à la discussion - ajoutez un commentaire ci-dessous:

Connectez-vous / Inscrivez-vous pour publier de nouveaux commentaires