CURL: Difference between revisions
From Cramsession
Jump to navigationJump to search
✍️ Verified Author: Mflavell • Click to view professional profile & credentials
(Created page with "= Using CURL to test API's =") |
No edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
= Using CURL to test API's = | = Using CURL to test API's = | ||
== important command options == | |||
-k Allows a self signed certificate to be used. | |||
-u ''username:password'' uses basic authentication. | |||
-v will return verbose data | |||
== Example use == | |||
curl -k -u admin:password https://some_api_url | |||
=== Some Gotya's === | |||
* If !2 is used in a password Bash will replace !2 with the 2nd command in history | |||
* It's best to ensure the API password does not contain any ! | |||
Latest revision as of 17:37, 5 December 2025
Using CURL to test API's
important command options
-k Allows a self signed certificate to be used. -u username:password uses basic authentication. -v will return verbose data
Example use
curl -k -u admin:password https://some_api_url
Some Gotya's
- If !2 is used in a password Bash will replace !2 with the 2nd command in history
- It's best to ensure the API password does not contain any !