Software Licensing API - Example using cURL

This document is a subset of the Software Licensing API document which lists all features available via the API. The following information is how to implement those features with cURL.

cURL is an open source command line tool and library for transferring data with URL syntax. cURL comes installed on modern versions of Mac OS X, and by default in most Linux distributions. You can test simply by typing

curl

on the command line and pressing enter. If cURL is installed you'll see a message similar to this:

curl: try 'curl --help' or 'curl --manual' for more information

To ask cURL to make an http request for you, tell it your variables and the URL you'd like to send it to, like this:

Flags

cURL accepts many flags to change its behavior. A full tutorial of cURL is out of the scope of this document, but take a look at these flags that may interest you:

-u, --user USER[:PASSWORD] Server user and password

-A, --user-agent STRING Send User-Agent STRING to server (H)

-d, --data DATA HTTP POST data (H)

-s, --silent Silent mode (don't output anything)

-o, --output FILE Write to FILE instead of stdout

-k, --insecure Allow connections to SSL sites without certs (H)

-K, --config FILE Read config from FILE

bash scripting

bash is a common Unix shell and allows for scripting actions. The following is a simple bash script that will prompt for several things and then run the cURL request and render the output to the screen.