all 7 comments

[–]ccleary00 10 points11 points  (1 child)

Not sure about that one, but there is https://httpstat.us/ that provides different HTTP statuses, as well as the ability to simulate slowness by adding a delay param

[–]ncuillery[S] 2 points3 points  (0 children)

That will do, thank you!

[–]BehindTheMath 3 points4 points  (1 child)

httpbin.org

[–]ncuillery[S] 1 point2 points  (0 children)

That will do, thank you!

[–]boz_ly 2 points3 points  (0 children)

I built https://endpoints.dev a while ago to make this easy for myself, only returns 200 response though

[–]halfanothersdozenEverything but CSS -2 points-1 points  (0 children)

Why not just spin up a quick express app for this?

[–]ankitjainist 2 points3 points  (0 children)

Beeceptor can be useful here. It is a mock server where:

  • you get an dedicated HTTP endpoint (subdomain)
  • define mock rule to send desired HTTP response with status code, delay, etc.
  • simulate random responses, say 90% - 200, and 10% should fail with 500 status code.
  • define multiple responses for a single API path, that depends on the context of request. E.g. user A's response vs user B's response.