curl is a command-line tool that may be used to submit a HTTPS request to our REST API.
Curl Content Type Xml
Leverage curl in your script or application through the use of bindings.
Step 1: Copy Your Authorization Token
Almost all requests to our REST API services require authorization. Authorization is granted by passing a REST API token via the Authorization request header using the following syntax:
Copy your REST API token from the Web Service REST API Token section of the My Settings page.
If the Web Service REST API Token section is not present on the My Settings page, then you are not authorized to access our REST API services. Please contact your CDN administrator to gain access.
Step 2: Submit a curl Request
Curl-F password=@/etc/passwd www.mypasswords.com To read the file's content from stdin insted of a file, use - where the file name should've been. This goes for both @ and curl what Content-Type to use for the file upload part, by using 'type=', in a manner similar to.
This section will construct a curl request for the Load Content endpoint.
PHP cURL Content-Length and Content-Type wrong. Thanks in advance for any help! Curl http-headers content-type. Follow edited May 23 '17 at 12:00. CURL – PUT request examples. In my opinion, a PUT can be used for a create if a second PUT with the same data would result in no change and no new record. Here is a list of MIME types, associated by type of documents, ordered by their common extensions. Two primary MIME types are important for the role of default types.
From a terminal, type:
The -sk and -X parameters indicate that a silent and insecure PUT request will be submitted.
Append the following -H parameter and replace TokenValue with the token copied at the start of this tutorial.
The above parameter adds an Authorization header and sets it to the REST API token through which this request will be authorized.
Curl Content Types
Append the following -H parameters:
The above parameters add the Content-Type and Accept request headers to the request. These headers define the media type (aka content type) for the request body and the response body, respectively.
Append the following -d parameter and then replace the specified URL with a CDN or edge CNAME URL that points to the desired content.
The above parameter defines the request body. In this case, the request body identifies
Append the following URL and replace 0001 with your customer account number.
The above URL identifies the endpoint that will be requested.
Verify that your curl request looks similar to the following:
Submit the curl request.
Additional Information
This section contains basic syntax information and a sample request.
Syntax
This syntax will generate a silent response:
The above curl syntax assumes that the endpoint contains request body parameters. If the desired endpoint does not contain a request body, then you should use the following syntax:
Example
The following sample syntax will generate a silent response for a purge request:
The properties of the above purge syntax are described below.
Curl Content Type Zip
Syntax | Setting | Value |
---|---|---|
-X PUT | HTTP Method | PUT Google chrome dark theme. |
-H 'Authorization: TOK:12345678-1234-1234-1234-1234567890ab' | 12345678-1234-1234-1234-1234567890ab | |
-H 'Content-Type: application/json' | Request Body Format | JSON |
-H 'Accept: application/json' | Response Body Format | JSON |
'MediaPath':'http://wpc.0001.edgecastcdn.net/000001/folder1/file.htm' | Purge URL | http://wpc.0001.edgecastcdn.net/000001/folder1/file.htm |
'MediaType':3 | Platform | HTTP Large |
'https://api.edgecast.com/v2/mcc/customers/0001/edge/purge' | Request URI | https://api.edgecast.com/v2/mcc/customers/0001/edge/purge |