A cUrl:
curl -XPOST -H "Content-Type: application/json" -k -d '{"name":"test"}' -u username:password https://<host url>/api/v1/users/<username>/tokens
How to put “-u username:password” in a request on Postman?
A cUrl:
curl -XPOST -H "Content-Type: application/json" -k -d '{"name":"test"}' -u username:password https://<host url>/api/v1/users/<username>/tokens
How to put “-u username:password” in a request on Postman?
Hi @aviation-operator-56 and welcome to the community!
If you’ve got a curl command and you’re ever in doubt about how best to format it in Postman, the easiest way is to use the “Import” button in the top-left of the screen. You can choose to import raw text (i.e. you can paste your curl command in here) and it will be imported with the settings that you require.
In your example, for a simple username/password parameter, you would select “Basic Auth” on the Authorization tab, and enter the username/password in the boxes provided.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.