I need to pass some piece of information to my .liquid pages (via an ajax request). I'm currently trying to use a custom HTTP request header to do this. I could also use a POST form parameter. However when trying to POST to the URL I get a 404 error. Meanwhile a GET works fine for the same URL. It seems like you have not implemented the POST then. So, I am instead trying to use an HTTP request header. I can see that I have successfully inserted it via the browser debug console. But I for the life of me cannot figure out how to read the header in my server-side .liquid code. Can anyone tell me how to do this? Or if its not doable, ANY way that I can pass a custom data parameter that my .liquid server code is able to read?
A very frustrated developer
in liquid you can't use server side script because liquid is templating language not server side language
Shopify theme developer and customization
I Would like to add new functionality or customize an existing one, please hire me.
If helpful then please Like and Accept Solution .