The following table lists commonly used cURL commands. For additional information or components, refer to http://curl.haxx.se/.

Component

Explanation

curl

Names the program being invoked. The manner in which you invoke the cURL command-line tool depends on how it has been installed in your environment.

-L

Identifies an HTTP Location. If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make cURL redo the request at the new location.

-v

Writes verbose output while sending and receiving HTTP messages. This option exposes more details of the HTTP transaction.

-b

Uses cookies stored in the specified file to authenticate the client. In Legacy REST Web Services, cookies are stored in a file named cookies.txt. The customer_cookies.txt file is used for external REST MVC calls, and the agent_cookies.txt file is used for agent-based internal REST MVC calls.

A session identifier must be stored in the file. When cURL logs into the REST Web Services, the cookies.txt instructs it to write the cookies it receives in that file.

-c

This command line option activates the cookie engine that makes cURL record and use cookies. You can also activate cookies by using the -b cookie option. Using –c provides the HTTP cookie file where cURL writes all cookies after a completed operation. cURL writes all cookies previously read from a specified file, as well as all cookies received from remote server(s). If no cookies are identified, no file will be written.

-X

Use the specified HTTP method when communicating with the REST Web Services.

-H

Include the specified Content-Type declaration in the HTTP request header. This describes the nature of the data in the message body of the HTTP request.

-d

Include the following content in the message body of the HTTP request.

URL

The URL of the REST Web Service that is used in the example.

Note: The HTTP transactions shown in the examples in this document may include specific details of the testing environment used to produce them. Some details may differ in the HTTP transactions you conduct with the REST Web Services. For example, the application server version identifiers shown in the HTTP transaction may not match the application that your Oracle Commerce Platform server uses.


Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices