Responding to cURL with a JSON Resumé 📚
Over the past couple of months I’ve received numerous messages asking me how I’ve made this website respond to cURL requests with JSON (a little like JSON Resumé). If you’re out of the loop, you can either curl -L hugo.md or check out this GIF:

It’s super simple to setup — I’ve done it with nginx and with Caddy. All it does is:
- Check the user agent on incoming requests to the root site (
example.site/) - If the user agent is cURL, respond with a JSON file
With nginx:
server {
listen 80;
server_name example.site;
root /home/you/www;
location / {
if ($http_user_agent ~* ^curl) {
rewrite ^/$ "/path/to/about.json";
break;
}
}
}With Caddy, it’s even easier:
example.site {
root /home/you/www
rewrite {
if {>User-Agent} has curl
if {path} is /
to /path/to/about.json
}
}Thought this was neat? Tweet me!
If you liked this post, you’ll probably enjoy one of my other projects, parrot.live 🐦 Try curl parrot.live to see it in action!
On the web
Family visits and procrastinating a blogpost - W49
Mon Dec 8 2025 by joelchrono's blogThe Fisherman and The Businessman
Wed Dec 3 2025 by Kev QuirkAn average new Dad's approach to training with kettlebells (and other tools) to develop General Physical Preparedness (GPP) at home
Mon Nov 24 2025 by Nicholas A. Danes, PhDBuilding for the future
Mon Oct 27 2025 by Anirudh OppiliappanSolving NYT's Pips Puzzle
Sat Oct 18 2025 by Andrew Healey's Blog
Generated by openring