{"id":18133348,"url":"https://github.com/andreapavoni/httpavonz","last_synced_at":"2025-04-06T16:23:03.886Z","repository":{"id":136327578,"uuid":"546759928","full_name":"andreapavoni/httpavonz","owner":"andreapavoni","description":"A simple service for generating different HTTP codes.","archived":false,"fork":false,"pushed_at":"2023-02-01T08:04:57.000Z","size":96,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T22:19:38.958Z","etag":null,"topics":["http","rust","webapp"],"latest_commit_sha":null,"homepage":"https://htt.pavonz.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreapavoni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-06T15:44:59.000Z","updated_at":"2022-10-07T11:03:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"52f7b473-c5d9-4f20-af11-74036641b4c9","html_url":"https://github.com/andreapavoni/httpavonz","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapavoni%2Fhttpavonz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapavoni%2Fhttpavonz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapavoni%2Fhttpavonz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapavoni%2Fhttpavonz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreapavoni","download_url":"https://codeload.github.com/andreapavoni/httpavonz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509970,"owners_count":20950347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http","rust","webapp"],"created_at":"2024-11-01T13:07:29.721Z","updated_at":"2025-04-06T16:23:03.848Z","avatar_url":"https://github.com/andreapavoni.png","language":"Rust","readme":"# httpavonz\n\nA simple service for generating different HTTP codes. It's a Rust re-implementation of https://httpstat.us, built just for fun.\n\nIt's useful for testing how your http clients deal with varying responses.\n\n## How it works\n\nJust append the status code you want in the URL, like [https://htt.pavonz.com/200](/200) and it'll return a response like the following:\n\n```sh\n$ curl -v \"https://htt.pavonz.com/401\"\n*   Trying 1.2.3.4:80...\n* Connected to htt.pavonz.com (1.2.3.4) port 80 (#0)\n\u003e GET /401 HTTP/1.1\n\u003e Host: htt.pavonz.com\n\u003e User-Agent: curl/7.79.1\n\u003e Accept: */*\n\u003e\n* Mark bundle as not supporting multiuse\n\u003c HTTP/1.1 401 Unauthorized\n\u003c content-type: text/plain; charset=utf-8\n\u003c www-authenticate: Basic realm=\"Fake Realm\"\n\u003c content-length: 16\n\u003c server: httpavonz\n\u003c access-control-allow-origin: *\n\u003c vary: origin\n\u003c vary: access-control-request-method\n\u003c vary: access-control-request-headers\n\u003c access-control-expose-headers: link,content-range,location,www-authenticate,proxy-authenticate,retry-after\n\u003c date: Fri, 07 Oct 2022 09:48:38 GMT\n\u003c\n* Connection #0 to host htt.pavonz.com left intact\n401 Unauthorized\n```\n\n## Supported status codes\n\n- [100](https://htt.pavonz.com/100) - _Continue_\n- [101](https://htt.pavonz.com/101) - _Switching Protocols_\n- [102](https://htt.pavonz.com/102) - _Processing_\n- [103](https://htt.pavonz.com/103) - _Early Hints_\n- [200](https://htt.pavonz.com/200) - _OK_\n- [201](https://htt.pavonz.com/201) - _Created_\n- [202](https://htt.pavonz.com/202) - _Accepted_\n- [203](https://htt.pavonz.com/203) - _Non-Authoritative Information_\n- [204](https://htt.pavonz.com/204) - _No Content_\n- [205](https://htt.pavonz.com/205) - _Reset Content_\n- [206](https://htt.pavonz.com/206) - _Partial Content_\n- [207](https://htt.pavonz.com/207)\n- [208](https://htt.pavonz.com/208) - _Already Reported_\n- [226](https://htt.pavonz.com/226)\n- [300](https://htt.pavonz.com/300) - _Multiple Choices_\n- [301](https://htt.pavonz.com/301) - _Moved Permanently_\n- [302](https://htt.pavonz.com/302) - _Found_\n- [303](https://htt.pavonz.com/303) - _See Other_\n- [304](https://htt.pavonz.com/304) - _Not Modified_\n- [305](https://htt.pavonz.com/305) - _Use Proxy_\n- [306](https://htt.pavonz.com/306) - _Switch Proxy_\n- [307](https://htt.pavonz.com/307) - _Temporary Redirect_\n- [308](https://htt.pavonz.com/308) - _Permanent Redirect_\n- [400](https://htt.pavonz.com/400) - _Bad Request_\n- [401](https://htt.pavonz.com/401) - _Unauthorized_\n- [402](https://htt.pavonz.com/402) - _Payment Required_\n- [403](https://htt.pavonz.com/403) - _Forbidden_\n- [404](https://htt.pavonz.com/404) - _Not Found_\n- [405](https://htt.pavonz.com/405) - _Method Not Allowed_\n- [406](https://htt.pavonz.com/406) - _Not Acceptable_\n- [407](https://htt.pavonz.com/407) - _Proxy Authentication Required_\n- [408](https://htt.pavonz.com/408) - _Request Timeout_\n- [409](https://htt.pavonz.com/409) - _Conflict_\n- [410](https://htt.pavonz.com/410) - _Gone_\n- [411](https://htt.pavonz.com/411) - _Length Required_\n- [412](https://htt.pavonz.com/412) - _Precondition Failed_\n- [413](https://htt.pavonz.com/413) - _Request Entity Too Large_\n- [414](https://htt.pavonz.com/414) - _Request-URI Too Long_\n- [415](https://htt.pavonz.com/415) - _Unsupported Media Type_\n- [416](https://htt.pavonz.com/416) - _Requested Range Not Satisfiable_\n- [417](https://htt.pavonz.com/417) - _Expectation Failed_\n- [418](https://htt.pavonz.com/418) - _I'm a teapot_\n- [421](https://htt.pavonz.com/421) - _Misdirected Request_\n- [422](https://htt.pavonz.com/422) - _Unprocessable Entity_\n- [423](https://htt.pavonz.com/423) - _Locked_\n- [425](https://htt.pavonz.com/425) - _Too Early_\n- [426](https://htt.pavonz.com/426) - _Upgrade Required_\n- [428](https://htt.pavonz.com/428) - _Precondition Required_\n- [429](https://htt.pavonz.com/429) - _Too Many Requests_\n- [431](https://htt.pavonz.com/431) - _Request Header Fields Too Large_\n- [451](https://htt.pavonz.com/451) - _Unavailable For Legal Reasons_\n- [500](https://htt.pavonz.com/500) - _Internal Server Error_\n- [501](https://htt.pavonz.com/501) - _Not Implemented_\n- [502](https://htt.pavonz.com/502) - _Bad Gateway_\n- [503](https://htt.pavonz.com/503) - _Service Unavailable_\n- [504](https://htt.pavonz.com/504) - _Gateway Timeout_\n- [505](https://htt.pavonz.com/505) - _HTTP Version Not Supported_\n- [506](https://htt.pavonz.com/506) - _Variant Also Negotiates_\n- [507](https://htt.pavonz.com/507) - _Insufficient Storage_\n- [508](https://htt.pavonz.com/508)\n- [510](https://htt.pavonz.com/510)\n- [511](https://htt.pavonz.com/511) - _Network Authentication Required_\n- [520](https://htt.pavonz.com/520) - _Web Server Returned an Unknown Error_\n- [521](https://htt.pavonz.com/521) - _Web Server Is Down_\n- [522](https://htt.pavonz.com/522) - _Connection Timed out_\n- [523](https://htt.pavonz.com/523) - _Origin Is Unreachable_\n- [524](https://htt.pavonz.com/524) - _A Timeout Occurred_\n- [525](https://htt.pavonz.com/525) - _SSL Handshake Failed_\n- [526](https://htt.pavonz.com/526) - _Invalid SSL Certificate_\n- [527](https://htt.pavonz.com/527) - _Railgun Error_\n- [530](https://htt.pavonz.com/530)\n\n## Other features\n\n#### JSON responses\n\nTo get a JSON response back, you need to set `Accept` header to `application/json`. Then it'll JSON encode the response and send the `Content-Type` header accordingly.\n\n#### Delayed replies\n\nIf you want a delay on the response add a query string `sleep` (the time is in ms, max 5 minutes), for example: [https://htt.pavonz.com/200?sleep=5000](/200?sleep=5000)\n\n#### CORS\n\nAll endpoints have been configured to allow all origins, headers, and HTTP methods.\n\n#### Unknown codes\n\nIf you send any other three digit number that's not in that list, it'll return it too. Or, [send a PR](https://github.com/andreapavoni/httpavonz) to add full support for a new code.\n\n## Up and running\n\n#### Locally\n\nUsing `Cargo`:\n\n```sh\n$ cargo run\n```\n\nor Docker:\n\n```sh\n$ docker run --rm --env-file .env.dist -it -p 8080:8080 $(docker build .)\n```\n\nthen try a request:\n\n```sh\n$ curl -v \"https://127.0.0.1:8080/401\"\n```\n\n#### Deploy\n\nDepending on the provider, there isn't a standard procedure.\n\n## Credits\n\nThe authors of [httpstat.us](https://httpstat.us) for their brillant idea and execution.\n\n---\n\n©2022 a [pavonz](https://pavonz.com) joint\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreapavoni%2Fhttpavonz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreapavoni%2Fhttpavonz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreapavoni%2Fhttpavonz/lists"}