Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I'm leveraging .NET Razor pages for my proxy applications, and so i have been able to successfully leverage jquery to make GET requests from my Razor View to my Razor backend.
However, I have yet to figure out how this is done for POST requests without getting a 400 error.
the structure of my ajax calls are generally as such:
$.ajax({
type: 'POST',
url: '/apps/proxyappname?handler=UpdateInfo',
data: JSON.stringify(formData),
contentType: 'application/json',
dataType: 'json',
success: function (response) {
console.log("Update successful:", response);
},
error: function (xhr, status, error) {
console.log("XHR:", xhr);
console.log("Status:", status);
console.log("Response Text:", xhr.responseText);
}
});
is there something that has to be passed in addition? Thank you guys
so update: with more digging I see that we have to pass the Access token of the proxy application
I did so by passing it with the Bearer prefix, and can confirm that it is showing up in the Network's Header tab with Dev Tools:
" Authorization: Bearer access_token_value "
nonetheless, I am getting the 400 bad request. Any Shopify Developers working with .NET know about this?
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025