As I work on integrating a 3rd party API into my website, I am currently in the testing phase using Postman (the Chrome Extension) before proceeding to write my AngularJS Service with $http
. However, there is one aspect of the process that has me puzzled. The original curl command provided in the API documentation, with some URL modifications, looks like this:
curl -i -u "{clientId}:" -H "Content-Type: application/json" -X GET "https://api.thirdparty.com/api/rest/functionality"
The core concept seems straightforward - make a GET request to the specified URL and include the header "Content-Type: application/json"
. What leaves me unsure is how to handle the commands -i -u "{clientId}:"
. It's evident that this information needs to be included in the header, but what exactly should it look like? Should I simply add another header resembling "{clientId}:{clientId}"
, or is there a different approach for the -i and -u
directives?
Clarification: In this context, {clientId} serves as a placeholder for an actual clientId value such as '1qw43Q'.
I appreciate any assistance you can provide on this matter.