Welcome Guest, Not a member yet? Register   Sign In
REST or AJAX don't want toolbar
#1

When I'm building RESTful APIs or just methods that are used by AJAX requests I'm finding the debug toolbar is getting in the way by adding a lot of content to the output. I guess I can always change the .env file to put the site into production mode to prevent this but am I missing any other ways of indicating that is is not required?
Reply
#2

AJAX Requests — CodeIgniter 4.1.9 documentation
https://codeigniter4.github.io/userguide.../ajax.html
Reply
#3

Thanks for the pointer, if anyone else is using Postman to test API related things, try adding the header X-Requested-With set to XMLHttpRequest and the toolbar won't be returned.
Reply
#4

If you're using VS Code you can use the 'thunderclient' extension. Works a treat and you never have to leave the editor, my personal favourite extension after 'VIM'
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
Reply




Theme © iAndrew 2016 - Forum software by © MyBB