Use cURL

cURL is an open source, command-line tool for transferring data with URL syntax, supporting various protocols including HTTP and HTTPS. The examples in this document use cURL to demonstrate how to access the Oracle Messaging Cloud Service REST API.

For information about downloading and installing cURL on Windows, see Installing the cURL Command-Line Tool on Windows. For more information about authentication requirements, see Authentication.

cURL can be configured to use cookies. Cookies are essential to the Oracle Messaging Cloud Service because it ensures the client's requests are routed back to the same HTTP Session allowing for use of the same connection, session, producer and consumer.

cURL uses the -c option to specify where to store cookies received from the server and the -b option to specify from where to get cookies to send to the server. For simplicity both options can be used together. The file specified for the -b option must be the same file as specified for the -c option. If the file does not exist, cURL will not send cookies.

The following example cURL command creates a queue named Ex1_Queue in the usoracletrial00484 identity domain:

curl -v -u john.doe@example.com:Welcome123 -c myCookies.txt -b myCookies.txt -X PUT https://messaging.us2.oraclecloud.com/messagingtrial3930-usoracletrial00484/api/v1/queues/Ex1_Queue