I have not found a solution or discussion about this on the forum, and I want to know how developers are making http post requests (not the shopify API) from their proxy application to their backend/internal api services. I have attempted to pass the proxy app’s access token in the header, antiforgerytoken, etc.. and I keep getting a 400 Bad Request.
I’m using .NET Razor pages for my apps so its expected to do a general setup such as:
$.ajax({
type: 'POST',
url: '?handler=UpdateCollectorInfo',
headers: {
'Content-Type': 'application/json'
},
data: JSON.stringify(formData),
headers: {
'RequestVerificationToken': antiForgeryToken
},
success: function (response) {
},
error: function (xhr, status, error) {
}
});
This setup works for only my http GET requests so far. Anyone know how to resolve this?