March 2018
Beginner
584 pages
14h 51m
English
In this example, we used cURL to perform HTTP GET and HTTP POST requests. cURL is available in most operating systems. cURL is executed from a command-line prompt, and the curl -V or curl --version command can be used to check which version of cURL is running in the operating system.
The simplest command syntax to use with cURL is basically curl <URL>, for example, curl https://nsxmgr-01a.corp.local/. Since we need to use specific HTTP methods, such as adding custom headers and credentials to the request, we need to add cURL-specific options before the URL, as the following command snippet shows:
curl -k -X GET -H "Accept: application/xml" -H "Content-Type: application/xml" -u admin:VMware1! 'https://nsxmgr-01a.corp.local/api/2.0/services/usermgmt/user/admin' ...
Read now
Unlock full access