I get a 400 axios network error when making this request.
React Native Code
const formData = new FormData();
formData.append('Images', [
{ uri: selectedImage.uri, name: selectedImage.fileName, type: selectedImage.type },
] as any);
const headers = {
Authorization: `Bearer ${await getToken()}`,
'Content-Type': 'multipart/form-data',
};
const res = await api.post(url, formData, {
headers,
transformResponse: () => formData,
responseType: 'json',
data: formData,
});
return res;
The type of property images is List in c#. I have been able to run the request succesfully using postman so the error must come from the way I am sending axios request. The error does not provide information about what goes on.
Thanks!
New contributor
user25702525 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.