3 ms·
1. What do you do if you wish to hide a query from the HTTP access log? Normally I would use POST rather than GET, but if I wish to make my API restful I have t
by lhnz 15y ago
1. What do you do if you wish to hide a query from the HTTP access log? Normally I would use POST rather than GET, but if I wish to make my API restful I have to ensure that POST is for create, and GET is for read.
2. Does PUT data also not appear in the HTTP access log?
3. What do you gain from doing everything this way? There are a lot of developers that won't have any idea what all of these HTTP request codes and methods actually are.
- Ramone 15y agoFigure out how to log only what you want. Don't let your choice of an inflexible logging system affect your external API. What do you get? Well many things, but specific to your inquiries: using GET tells the client of your API that the request is cache-able (for better performance -- a browser won't cache POSTs), and it tells that client that it's safe to call without unintended consequences. A search engine spider should be safe to just hit every uri via GET that it finds, because those are supposed to be read-only.
- rhizome 15y ago1. You don't. Standard practice is to log everything, and more than you think you'll need. If you don't want to see those queries, configure your log viewing process/facility to ignore them.