php - how to know where http request 302 leads?
I'm working on Shopify API and trying to register uninstall webhook for my plugin which is registered successfully and i do get a response e.g.
stdClass Object ( [webhook] => stdClass Object ( [id] => 52102211 [address] => http://www.example.com/dev1/login?code=42db53dae6d706f095711b8365a941e8&hmac=6ca8a5fa6659ea9b976454d352c73024d98417b0e20665c08090c636d3c9662b&shop=my-shopify-shop.myshopify.comsignature=ed384b260216b100ea2090e0d3c26460Г—tamp=1438850605/delete_shop [topic] => app/uninstalled [created_at] => 2015-08-06T04:43:27-04:00 [updated_at] => 2015-08-06T04:43:27-04:00 [format] => json [fields] => Array ( ) [metafield_namespaces] => Array ( ) ) )
When i delete my plugin it generates a 302 POST request.
I want to see that where does this request leads so that I'd be sure that it is coming straight to my controller action for handling this i.e. to example.com/delete_shop
I'm working in PHP CI and sending email in my code upon the call of this function. Here are the routes:
$route['default_controller'] = "home"; $route['product_edit/:any'] = "home/product_edit"; $route['delete_shop'] = "home/delete_shop"; $route['404_override'] = '';
Is there any problem with my routes because I never receive an email even after hours? (email functionality is working properly in the application though)
here is the image for the request generated
A 302 is a temporaly redirect. You can follow the requests with tools as:
- Firebug (https://getfirebug.com/downloads (https://getfirebug.com/downloads))
- Browser console for developers in Chrome, Safari, Firefox, Internet Explorer, etc.
The tools above make it possible to log the requests. Detailed information provided, such as request headers, response headers, response body, etc.
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.