In my recent explorations, I found an interesting service that might come in handy for testing scripts: httpstat.us. As described on the site, it is a super simple service for generating different HTTP codes. It pretty much does what’s on the tin:
$ curl -s -v http://httpstat.us/200
* Trying 104.31.87.226...
* TCP_NODELAY set
* Connected to httpstat.us (104.31.87.226) port 80 (#0)
> GET /200 HTTP/1.1
> Host: httpstat.us
> User-Agent: curl/7.58.0
> Accept: */*
$ curl -s -v http://httpstat.us/403
* Trying 172.67.165.19...
* TCP_NODELAY set
* Connected to httpstat.us (172.67.165.19) port 80 (#0)
> GET /403 HTTP/1.1
> Host: httpstat.us
> User-Agent: curl/7.58.0
> Accept: */*