I have to send a POST request of the form: “Content-Type”: “multipart/form-data” and I am using capacitor V4.7 but when the request is sent it becomes “application/json” checking the network from the mobile device . How can I send this the way I said before, is it possible?
are. you using the http plugin?
Yes:
import { CapacitorHttp } from “@capacitor/core”;
const HttpOptions = {
method: “POST”,
url: url2,
headers: {
“Content-Type”: “multipart/form-data”,
// enctype: “multipart/form-data”,
},
data: datos
};
const response = await CapacitorHttp.request(HttpOptions);
console.log(response.data);
2 Likes