def reason
gralha-http-core@0.1.0.0 · http.bend:312
import gralha-http-core@0.1.0.0/http.bend as Http
import Base
312
313def reason(+code: U32) -> String:
314 match code:
315 case 200: "OK"
316 case 201: "Created"
317 case 202: "Accepted"
318 case 204: "No Content"
319 case 206: "Partial Content"
320 case 100: "Continue"
321 case 101: "Switching Protocols"
322 case 301: "Moved Permanently"
323 case 302: "Found"
324 case 303: "See Other"
325 case 304: "Not Modified"
326 case 307: "Temporary Redirect"
327 case 308: "Permanent Redirect"
328 case 400: "Bad Request"
329 case 401: "Unauthorized"
330 case 403: "Forbidden"
331 case 404: "Not Found"
332 case 405: "Method Not Allowed"
333 case 406: "Not Acceptable"
334 case 408: "Request Timeout"
335 case 409: "Conflict"
336 case 410: "Gone"
337 case 411: "Length Required"
338 case 413: "Content Too Large"
339 case 414: "URI Too Long"
340 case 415: "Unsupported Media Type"
341 case 416: "Range Not Satisfiable"
342 case 422: "Unprocessable Content"
343 case 429: "Too Many Requests"
344 case 500: "Internal Server Error"
345 case 501: "Not Implemented"
346 case 502: "Bad Gateway"
347 case 503: "Service Unavailable"
348 case 504: "Gateway Timeout"
349 case _: ""