# Using GET with url:
curl "https://crispcache.com/api/images/resize?width=600&height=400&inline=false&url=https://example.com/image.jpg"
# Using POST with image file:
curl -X POST "https://crispcache.com/api/images/resize?width=600&height=400&inline=false" -F "[email protected]"
// Using GET with url:
$url = "https://crispcache.com/api/images/resize?width=600&height=400&inline=false&url=https://example.com/image.jpg";
$response = file_get_contents($url);
// Using POST with image file:
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://crispcache.com/api/images/resize?width=600&height=400&inline=false",
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
'image' => new CURLFile('image.jpg')
]
]);
$response = curl_exec($curl);
// Using GET with url:
fetch('https://crispcache.com/api/images/resize?width=600&height=400&inline=false&url=https://example.com/image.jpg', {
method: 'GET'
})
.then(response => response.json())
.then(data => console.log(data));
// Using POST with image file:
fetch('https://crispcache.com/api/images/resize?width=600&height=400&inline=false', {
method: 'POST',
body: {
image: 'image.jpg'
}
})
.then(response => response.json())
.then(data => console.log(data));
# Using GET with url:
require 'rest-client'
response = RestClient.get(
'https://crispcache.com/api/images/resize?width=600&height=400&inline=false&url=https://example.com/image.jpg'
)
# Using POST with image file:
require 'rest-client'
response = RestClient.post(
'https://crispcache.com/api/images/resize?width=600&height=400&inline=false',
{
image: File.new('image.jpg')
}
)
// Using GET with url:
resp, err := http.Get("https://crispcache.com/api/images/resize?width=600&height=400&inline=false&url=https://example.com/image.jpg")
// Using POST with file:
file, _ := os.Open("image.jpg")
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
part, _ := writer.CreateFormFile("image", "image.jpg")
io.Copy(part, file)
writer.Close()
req, _ := http.NewRequest("POST",
"https://crispcache.com/api/images/resize?width=600&height=400&inline=false",
body)
req.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{}
resp, err := client.Do(req)
# Using GET with url:
import requests
response = requests.get(
'https://crispcache.com/api/images/resize?width=600&height=400&inline=false&url=https://example.com/image.jpg'
)
# Using POST with image file:
import requests
response = requests.post(
'https://crispcache.com/api/images/resize?width=600&height=400&inline=false',
files={'image': open('image.jpg', 'rb')}
)
// Using GET with url:
let url = "https://crispcache.com/api/images/resize?" +
"width=600&height=400&inline=false&url=https://example.com/image.jpg";
let response = reqwest::get(url).await?;
// Using POST with image file:
let client = reqwest::Client::new();
let response = client.post(
"https://crispcache.com/api/images/resize?width=600&height=400&inline=false"
)
.body(image.jpg)
.send()
.await?;
# Using GET with url:
curl "https://crispcache.com/api/images/convert?format=jpeg&quality=80&inline=false&url=https://example.com/image.jpg"
# Using POST with image file:
curl -X POST "https://crispcache.com/api/images/convert?format=jpeg&quality=80&inline=false" -F "[email protected]"
// Using GET with url:
$url = "https://crispcache.com/api/images/convert?format=jpeg&quality=80&inline=false&url=https://example.com/image.jpg";
$response = file_get_contents($url);
// Using POST with image file:
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://crispcache.com/api/images/convert?format=jpeg&quality=80&inline=false",
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
'image' => new CURLFile('image.jpg')
]
]);
$response = curl_exec($curl);
// Using GET with url:
fetch('https://crispcache.com/api/images/convert?format=jpeg&quality=80&inline=false&url=https://example.com/image.jpg', {
method: 'GET'
})
.then(response => response.json())
.then(data => console.log(data));
// Using POST with image file:
fetch('https://crispcache.com/api/images/convert?format=jpeg&quality=80&inline=false', {
method: 'POST',
body: {
image: 'image.jpg'
}
})
.then(response => response.json())
.then(data => console.log(data));
# Using GET with url:
require 'rest-client'
response = RestClient.get(
'https://crispcache.com/api/images/convert?format=jpeg&quality=80&inline=false&url=https://example.com/image.jpg'
)
# Using POST with image file:
require 'rest-client'
response = RestClient.post(
'https://crispcache.com/api/images/convert?format=jpeg&quality=80&inline=false',
{
image: File.new('image.jpg')
}
)
// Using GET with url:
resp, err := http.Get("https://crispcache.com/api/images/convert?format=jpeg&quality=80&inline=false&url=https://example.com/image.jpg")
// Using POST with image file:
file, _ := os.Open("image.jpg")
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
part, _ := writer.CreateFormFile("image", "image.jpg")
io.Copy(part, file)
writer.Close()
req, _ := http.NewRequest("POST",
"https://crispcache.com/api/images/convert?format=jpeg&quality=80&inline=false",
body)
req.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{}
resp, err := client.Do(req)
# Using GET with url:
import requests
response = requests.get(
'https://crispcache.com/api/images/convert?format=jpeg&quality=80&inline=false&url=https://example.com/image.jpg'
)
# Using POST with image file:
import requests
response = requests.post(
'https://crispcache.com/api/images/convert?format=jpeg&quality=80&inline=false',
files={'image': open('image.jpg', 'rb')}
)
// Using GET with url:
let url = "https://crispcache.com/api/images/convert?" +
"format=jpeg&quality=80&inline=false&url=https://example.com/image.jpg";
let response = reqwest::get(url).await?;
// Using POST with image file:
let client = reqwest::Client::new();
let response = client.post(
"https://crispcache.com/api/images/convert?format=jpeg&quality=80&inline=false"
)
.body(image.jpg)
.send()
.await?;
# Using GET with url:
curl "https://crispcache.com/api/images/compress?quality=80&inline=false&url=https://example.com/image.jpg"
# Using POST with image file:
curl -X POST "https://crispcache.com/api/images/compress?quality=80&inline=false" -F "[email protected]"
// Using GET with url:
$url = "https://crispcache.com/api/images/compress?quality=80&inline=false&url=https://example.com/image.jpg";
$response = file_get_contents($url);
// Using POST with image file:
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://crispcache.com/api/images/compress?quality=80&inline=false",
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
'image' => new CURLFile('image.jpg')
]
]);
$response = curl_exec($curl);
// Using GET with url:
fetch('https://crispcache.com/api/images/compress?quality=80&inline=false&url=https://example.com/image.jpg', {
method: 'GET'
})
.then(response => response.json())
.then(data => console.log(data));
// Using POST with image file:
fetch('https://crispcache.com/api/images/compress?quality=80&inline=false', {
method: 'POST',
body: {
image: 'image.jpg'
}
})
.then(response => response.json())
.then(data => console.log(data));
# Using GET with url:
require 'rest-client'
response = RestClient.get(
'https://crispcache.com/api/images/compress?quality=80&inline=false&url=https://example.com/image.jpg'
)
# Using POST with image file:
require 'rest-client'
response = RestClient.post(
'https://crispcache.com/api/images/compress?quality=80&inline=false',
{
image: File.new('image.jpg')
}
)
// Using GET with url:
resp, err := http.Get("https://crispcache.com/api/images/compress?quality=80&inline=false&url=https://example.com/image.jpg")
// Using POST with image file:
file, _ := os.Open("image.jpg")
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
part, _ := writer.CreateFormFile("image", "image.jpg")
io.Copy(part, file)
writer.Close()
req, _ := http.NewRequest("POST",
"https://crispcache.com/api/images/compress?quality=80&inline=false",
body)
req.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{}
resp, err := client.Do(req)
# Using GET with url:
import requests
response = requests.get(
'https://crispcache.com/api/images/compress?quality=80&inline=false&url=https://example.com/image.jpg'
)
# Using POST with image file:
import requests
response = requests.post(
'https://crispcache.com/api/images/compress?quality=80&inline=false',
files={'image': open('image.jpg', 'rb')}
)
// Using GET with url:
let response = reqwest::get("https://crispcache.com/api/images/compress?quality=80&inline=false&url=https://example.com/image.jpg").await?;
// Using POST with image file:
let client = reqwest::Client::new();
let response = client.post(
"https://crispcache.com/api/images/compress?quality=80&inline=false"
)
.body(image.jpg)
.send()
.await?;
# Using GET with URL:
curl "https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24&url=https://example.com/image.jpg"
# Using POST with file:
curl -X POST "https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24" -F "[email protected]"
// Using GET with URL:
$url = "https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24&url=https://example.com/image.jpg";
$response = file_get_contents($url);
// Using POST with file:
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24",
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
'image' => new CURLFile('image.jpg')
]
]);
$response = curl_exec($curl);
// Using GET with URL:
fetch('https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24&url=https://example.com/image.jpg')
.then(response => response.json())
.then(data => console.log(data));
// Using POST with file:
const formData = new FormData();
formData.append('image', imageFile);
fetch('https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => console.log(data));
# Using GET with URL:
require 'open-uri'
response = URI.open("https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24&url=https://example.com/image.jpg").read
# Using POST with file:
require 'rest-client'
response = RestClient.post(
'https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24',
{
image: File.new('image.jpg')
}
)
// Using GET with URL:
resp, err := http.Get("https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24&url=https://example.com/image.jpg")
// Using POST with file:
file, _ := os.Open("image.jpg")
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
part, _ := writer.CreateFormFile("image", "image.jpg")
io.Copy(part, file)
writer.Close()
req, _ := http.NewRequest("POST",
"https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24",
body)
req.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{}
resp, _ := client.Do(req)
# Using GET with URL:
import requests
response = requests.get(
'https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24&url=https://example.com/image.jpg'
)
# Using POST with file:
import requests
response = requests.post(
'https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24',
files={'image': open('image.jpg', 'rb')}
)
// Using GET with URL:
let response = reqwest::get("https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24&url=https://example.com/image.jpg").await?;
// Using POST with file:
let client = reqwest::Client::new();
let response = client.post(
"https://crispcache.com/api/images/watermark?text=Sample&position=bottom-right&opacity=50&size=24"
)
.body(image.jpg)
.send()
.await?;
# Using GET with url:
curl "https://crispcache.com/api/css/minify?inline=false&url=https://example.com/style.css"
# Using POST with image file:
curl -X POST "https://crispcache.com/api/css/minify?inline=false" -F "[email protected]"
// Using GET with url:
$response = file_get_contents("https://crispcache.com/api/css/minify?inline=false&url=https://example.com/style.css");
// Using POST with image file:
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://crispcache.com/api/css/minify?inline=false",
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
'file' => new CURLFile('style.css')
]
]);
$response = curl_exec($curl);
// Using GET with url:
fetch('https://crispcache.com/api/css/minify?inline=false&url=https://example.com/style.css', {
method: 'GET'
})
.then(response => response.json())
.then(data => console.log(data));
// Using POST with image file:
fetch('https://crispcache.com/api/css/minify?inline=false', {
method: 'POST',
body: {
css: 'style.css'
}
})
.then(response => response.json())
.then(data => console.log(data));
# Using GET with url:
require 'rest-client'
response = RestClient.get(
'https://crispcache.com/api/css/minify?inline=false&url=https://example.com/style.css'
)
# Using POST with image file:
require 'rest-client'
response = RestClient.post(
'https://crispcache.com/api/css/minify?inline=false',
{
css: File.new('style.css')
}
)
// Using GET with url:
resp, err := http.Get("https://crispcache.com/api/css/minify?inline=true&url=https://example.com/style.css")
// Using POST with image file:
file, _ := os.Open("style.css")
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
part, _ := writer.CreateFormFile("file", "style.css")
io.Copy(part, file)
writer.Close()
req, _ := http.NewRequest("POST",
"https://crispcache.com/api/css/minify?inline=false",
body)
req.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{}
resp, err := client.Do(req)
# Using GET with url:
import requests
response = requests.get(
'https://crispcache.com/api/css/minify?inline=false&url=https://example.com/style.css'
)
# Using POST with image file:
import requests
response = requests.post(
'https://crispcache.com/api/css/minify?inline=false',
files={'file': open('style.css', 'rb')}
)
// Using GET with url:
let response = reqwest::get("https://crispcache.com/api/css/minify?inline=false&url=https://example.com/style.css").await?;
// Using POST with image file:
let client = reqwest::Client::new();
let response = client.post(
"https://crispcache.com/api/css/minify?inline=false"
)
.body(style.css)
.send()
.await?;
# Using GET with url:
curl "https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true&url=https://example.com/script.js"
# Using POST with file:
curl -X POST "https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true" -F "[email protected]"
// Using GET with url:
$response = file_get_contents("https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true&url=https://example.com/script.js");
// Using POST with file:
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true",
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => [
'file' => new CURLFile('script.js')
]
]);
$response = curl_exec($curl);
// Using GET with url:
fetch('https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true&url=https://example.com/script.js')
.then(response => response.json())
.then(data => console.log(data));
// Using POST with file:
const formData = new FormData();
formData.append('file', jsFile);
fetch('https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => console.log(data));
# Using GET with url:
require 'rest-client'
response = RestClient.get(
'https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true&url=https://example.com/script.js'
)
# Using POST with file:
require 'rest-client'
response = RestClient.post(
'https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true',
{
js: File.new('script.js')
}
)
// Using GET with url:
resp, err := http.Get("https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true&url=https://example.com/script.js")
// Using POST with file:
file, _ := os.Open("script.js")
defer file.Close()
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
part, _ := writer.CreateFormFile("file", "script.js")
io.Copy(part, file)
writer.Close()
req, _ := http.NewRequest("POST",
"https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true",
body)
req.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{}
resp, err := client.Do(req)
# Using GET with url:
import requests
response = requests.get(
'https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true&url=https://example.com/script.js'
)
# Using POST with file:
import requests
response = requests.post(
'https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true',
files={'file': open('script.js', 'rb')}
)
// Using GET with url:
let response = reqwest::get("https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true&url=https://example.com/script.js").await?;
// Using POST with file:
let client = reqwest::Client::new();
let response = client.post(
"https://crispcache.com/api/js/minify?remove_space_comma=true&remove_whitespace=true&remove_empty=true&remove_comments=true"
)
.body(script.js)
.send()
.await?;