online / endpoints 59 / categories 14 / rate 60/min/ip /

GET /slow

GET /slow

Sleeps for the specified number of milliseconds, then returns 200 with a JSON body confirming the delay.

ms Delay in milliseconds. Range: 0–15000. Default: 1000.
build a request:

expect: 200 OK after the requested delay, with an X-Chaos-Delayed-Ms header confirming the wait.

bash
curl -i https://chaos.catastrophic.io/slow?ms=1000
import urllib.request
req = urllib.request.Request("https://chaos.catastrophic.io/slow?ms=1000")
with urllib.request.urlopen(req, timeout=30) as resp:
    print(resp.status, resp.headers["X-Chaos-Delayed-Ms"])
    print(resp.read().decode())
// Node 18+ or modern browser
const res = await fetch("https://chaos.catastrophic.io/slow?ms=1000");
console.log(res.status, res.headers.get("x-chaos-delayed-ms"));
console.log(await res.text());
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    resp, err := http.Get("https://chaos.catastrophic.io/slow?ms=1000")
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()
    body, _ := io.ReadAll(resp.Body)
    fmt.Println(resp.StatusCode, resp.Header.Get("X-Chaos-Delayed-Ms"))
    fmt.Println(string(body))
}
// Cargo.toml: reqwest = { version = "0.12", features = ["blocking"] }
fn main() -> Result<(), Box> {
    let resp = reqwest::blocking::get("https://chaos.catastrophic.io/slow?ms=1000")?;
    println!("{} {:?}", resp.status(), resp.headers().get("x-chaos-delayed-ms"));
    println!("{}", resp.text()?);
    Ok(())
}
// Java 11+ HttpClient
import java.net.URI;
import java.net.http.*;

public class Slow {
    public static void main(String[] args) throws Exception {
        var client = HttpClient.newHttpClient();
        var req = HttpRequest.newBuilder(URI.create("https://chaos.catastrophic.io/slow?ms=1000")).build();
        var resp = client.send(req, HttpResponse.BodyHandlers.ofString());
        System.out.println(resp.statusCode() + " " + resp.headers().firstValue("X-Chaos-Delayed-Ms").orElse(""));
        System.out.println(resp.body());
    }
}
// .NET 6+
using var client = new HttpClient();
var resp = await client.GetAsync("https://chaos.catastrophic.io/slow?ms=1000");
Console.WriteLine($"{(int)resp.StatusCode} {resp.Headers.GetValues("X-Chaos-Delayed-Ms").FirstOrDefault()}");
Console.WriteLine(await resp.Content.ReadAsStringAsync());
require "net/http"
res = Net::HTTP.get_response(URI("https://chaos.catastrophic.io/slow?ms=1000"))
puts "#{res.code} #{res["X-Chaos-Delayed-Ms"]}"
puts res.body
$r = Invoke-WebRequest -Uri 'https://chaos.catastrophic.io/slow?ms=1000' -TimeoutSec 30
$r.Headers['X-Chaos-Delayed-Ms']