From 21c3af32f716714010aea86da57e33b0224567d0 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Mon, 18 Nov 2024 14:35:09 +1100 Subject: [PATCH] Fixing home page links (#149) Closes #148 --- src/Teapot.Web/Pages/Index.cshtml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Teapot.Web/Pages/Index.cshtml b/src/Teapot.Web/Pages/Index.cshtml index 3a2b3c0..96218df 100644 --- a/src/Teapot.Web/Pages/Index.cshtml +++ b/src/Teapot.Web/Pages/Index.cshtml @@ -6,8 +6,7 @@

This is a super simple service for generating different HTTP codes.

It's useful for testing how your own scripts deal with varying responses.

- Just add the status code you want to the URL, like this: - @Html.RouteLink("httpstat.us/200", "StatusCode", new {statusCode = 200}) + Just add the status code you want to the URL, like this: httpstat.us/200.

We'll return a response like this:

@@ -27,13 +26,13 @@

To get a random response back, use the random/{range} endpoint, for example - @Html.RouteLink("httpstat.us/random/200,201,500-504", "Random", new {range = "200,201,500-504"}). + httpstat.us/random/200,201,500-504. You can duplicate ranges in order to increase their probability.

If you want a delay on the response add a query string or provide a header of @StatusExtensions.SLEEP_HEADER for the sleep duration (the time in ms, max 5 minutes*), like this: - @Html.RouteLink("httpstat.us/200?sleep=5000", "StatusCode", new {statusCode = 200, sleep = 5000}) + httpstat.us/200?sleep=5000.
*When using the hosted instance the timeout is actually 230 seconds, which is the max timeout allowed by an Azure App Service (see this thread post). If you host it yourself expect the limits to be different.