bernhard Posted April 4, 2018 Share Posted April 4, 2018 This is actually very easy but might be interesting for someone anyhow (and I post it here as a reminder for myself). You can use Postman (https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=de) to send requests to your ProcessWire installation and test request answers. The problem is that $config->ajax will always return FALSE. To make the $config->ajax work properly you just need to add this key-value-pair to your requests: key: X-Requested-With value: XMLHttpRequest Happy AJAXing PS: This also works inside the admin, see post 3 7 1 Link to comment Share on other sites More sharing options...
dragan Posted April 4, 2018 Share Posted April 4, 2018 Thanks for the tip. btw - PHPStorm has a REST client tool built-in (this is more of a reminder / info for other PHPStorm users - it's such a massive IDE that handy features like these can be easily missed) 2 Link to comment Share on other sites More sharing options...
bernhard Posted April 4, 2018 Author Share Posted April 4, 2018 You can even use it inside the backend: Install Postman Interceptor extension Activate the extension in the browser and in the postman app Go to your desired admin page (eg /page/edit/?id=123) The request will show up in the history and you can modify it to your needs I'm doing a die('test') here in the admin, with tracy installed, of course 3 Link to comment Share on other sites More sharing options...
szabesz Posted April 4, 2018 Share Posted April 4, 2018 4 hours ago, bernhard said: and I post it here as a reminder for myself Hehe. The PW forum is a nice snippets manager and knowledge base for free 2 Link to comment Share on other sites More sharing options...
Gideon So Posted April 5, 2018 Share Posted April 5, 2018 This community is so awesome and helpful. Gideon 3 Link to comment Share on other sites More sharing options...
bernhard Posted April 26, 2019 Author Share Posted April 26, 2019 Just found another nice tool for debugging rest apis: https://insomnia.rest/ 2 Link to comment Share on other sites More sharing options...
LostKobrakai Posted April 27, 2019 Share Posted April 27, 2019 For mac apps I can also recommend https://paw.cloud/. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now