Create CriticalCSS
POST /cpress/v1/criticalcss–
Additional Headers
Additional Parameters
No Params
Request Body
Example Responses
Example Requests
curl -X POST http://example.com/cpress/v1/criticalcss \
-H "Content-Type: application/json" \
-H "Content-Length: 125" \
-d {"endpoint":"http:\/\/example.com\/endpoint","target":"http:\/\/example.com\/target","target_body":"{}","target_header":"[]"} \
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://example.com/cpress/v1/criticalcss');
curl_setopt($ch, CURLOPT_POSTFIELDS, {"endpoint":"http:\/\/example.com\/endpoint","target":"http:\/\/example.com\/target","target_body":"{}","target_header":"[]"});
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Content-Length: 125",
]);
$response = curl_exec($ch);
import requests
url = 'http://example.com/cpress/v1/criticalcss'
body = {"endpoint":"http:\/\/example.com\/endpoint","target":"http:\/\/example.com\/target","target_body":"{}","target_header":"[]"}
headers = {"Content-Type":"application\/json","Content-Length":125}
req = requests.post(url, json = body, headers = headers)
Retrieve CriticalCSS
GET /cpress/v1/criticalcssAfter Generation was successfull, you can retrieve the content of the generated css with this call
Additional Headers
Additional Parameters
Request Body
No Body
Example Responses
Example Requests
curl -X GET http://example.com/cpress/v1/criticalcss?process_id=112358132 \
-H "Content-Type: application/json" \
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://example.com/cpress/v1/criticalcss?process_id=112358132');
curl_setopt($ch, CURLOPT_HTTPGET, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
]);
$response = curl_exec($ch);
import requests
url = 'http://example.com/cpress/v1/criticalcss?process_id=112358132'
body = {"endpoint":"http:\/\/example.com\/endpoint","target":"http:\/\/example.com\/target","target_body":"{}","target_header":"[]"}
headers = {"Content-Type":"application\/json"}
req = requests.get(url, headers = headers)
List Processes
GET /cpress/v1/processesList of all processes
Additional Headers
Additional Parameters
No Params
Request Body
No Body
Example Responses
Example Requests
curl -X GET http://example.com/cpress/v1/processes \
-H "Content-Type: application/json" \
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://example.com/cpress/v1/processes');
curl_setopt($ch, CURLOPT_HTTPGET, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
]);
$response = curl_exec($ch);
import requests
url = 'http://example.com/cpress/v1/processes'
body = {"endpoint":"http:\/\/example.com\/endpoint","target":"http:\/\/example.com\/target","target_body":"{}","target_header":"[]"}
headers = {"Content-Type":"application\/json"}
req = requests.get(url, headers = headers)