API Reference Docs

Always call jasoncheng.me/api in your HTTP request. Only POST requests are permitted.

This API is meant as a quick learning exercise for myself and are thus subject to Cloudflare Workers free tier rate limits.

Endpoints

All endpoints return serialized JSON objects. Specify request type through the "Query" header. The allowed "Query" values are:

Quickstart

Click a code block to copy its contents.

CMD/PS

curl.exe https://jasoncheng.me/api -X POST -H "Query: helloworld"

Shell

curl https://jasoncheng.me/api \
    -H "Content-Type: text/json" \
    -H "Query: helloworld"

Python

import requests

url = "https://jasoncheng.me/api"
params = {
    'Query': 'helloworld'
}

response = requests.post(url, headers=params).json()
print(response)

TypeScript

fetch("jasoncheng.me/api", {
    method: "POST",
    headers: {
        "Content-Type": "text/json"
        "Query": "helloworld"
    }
});