Shopify Add Items To Cart Using Get Request Working On Browser But Not Working With A Golang Script
I wanted to automate the process of adding items to cart on shopify stores. For example, at
http://www.oneness287.com . If you wish to buy these size 7.5 , going to
http://oneness287-2.myshopify.com/cart/29741797961:1 automatically adds the product to my cart and redirects me to the checkout page.
But when I do
from my golang code, and then check my cart. The cart is still empty. What is different in this case? In the first case I am making the request from the browser, in the second my script is making the request. How do I fix it?
When you make the request from go code the server creates a new session (basically new cookie) whereas the browser request have its own session, hence the request are not operating on the same cart. If you really want to do this then in the go code you will have to send all the cookies that you have in browser for this particular domain.
- → How to access the Visual interface for October?
- → How to implement DbDongle::convertTimestamps as workaround of invalid timestamps with MySql strict
- → Laravel 5: Apache php http authentication
- → Trait 'IlluminateFoundationBusDispatchesJobs' not found
- → Disable CSRF TokenMismatch for specific routes on Lumen
- → Change fill color of d3.js node
- → Authenticate with a cookie using laravel 5.1 and jwt
- → What is causing the web page to reload?
- → Is there any way to make an SVG object clickable?
- → Keeping uploaded files secure but still available via https
- → CORS missmatch because of http
- → 500 Internal Server Error Ajax Laravel
- → React: How to publish page on server using React-starter-kit