Reputation: 1723
I currently have an apache server running and an api endpoint in PHP
https://myserver.com/api.php
The server is utilizing .htaccess authentications (auth box pops up when first open URLs).
I can make a post/get request to my endpoint successfully without any authentication, but I wonder if I enable the auth, how do I pass the credentials in a post or get request?
Upvotes: 0
Views: 1490
Reputation: 23379
using either post or get you can send creds in the URL like so...
http://username:[email protected]/api.php
Upvotes: 1