Thus, my client needs a REST API using PHP, which provides output according to the conditions of the URL parameters
So now there are three URLs that are currently needed, and they are done.
therefore they
localhost/newapi/client/<AuthKey> - for authorizing
localhost/newapi/client/<clientid>/categories/ - to get all the categories
localhost/newapi/client/<clientid>/categories/<categoryid> - to get all items in a category
used .htaccess for trendy URL
So now he asked AuthKey to be added to the HTTP header, and not to the URL. Thus, AuthKey should be passed as a header, and the rest of the URL parameters
So my question is how can this be done. and how to get AuthKey from the request?
Any tutorials or comments on this subject are welcome.
source
share