{"id":37130663,"url":"https://github.com/cyb3r-jak3/simple_http_server","last_synced_at":"2026-01-14T15:01:21.161Z","repository":{"id":38328464,"uuid":"351978689","full_name":"Cyb3r-Jak3/simple_http_server","owner":"Cyb3r-Jak3","description":"Simple Go HTTP server to demo dealing with requests.","archived":true,"fork":false,"pushed_at":"2022-09-19T22:39:59.000Z","size":111,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T07:53:57.183Z","etag":null,"topics":["go","go-examples","go-http","golang","http"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cyb3r-Jak3.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-27T04:11:12.000Z","updated_at":"2023-01-27T21:04:56.000Z","dependencies_parsed_at":"2022-08-25T02:00:20.949Z","dependency_job_id":null,"html_url":"https://github.com/Cyb3r-Jak3/simple_http_server","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Cyb3r-Jak3/simple_http_server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyb3r-Jak3%2Fsimple_http_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyb3r-Jak3%2Fsimple_http_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyb3r-Jak3%2Fsimple_http_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyb3r-Jak3%2Fsimple_http_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cyb3r-Jak3","download_url":"https://codeload.github.com/Cyb3r-Jak3/simple_http_server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyb3r-Jak3%2Fsimple_http_server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["go","go-examples","go-http","golang","http"],"created_at":"2026-01-14T15:01:20.204Z","updated_at":"2026-01-14T15:01:21.136Z","avatar_url":"https://github.com/Cyb3r-Jak3.png","language":"Go","readme":"# Simple HTTP Server\n\n[![Test Go](https://github.com/Cyb3r-Jak3/simple_http_server/actions/workflows/golang.yml/badge.svg)](https://github.com/Cyb3r-Jak3/simple_http_server/actions/workflows/golang.yml) [![Publish Docker](https://github.com/Cyb3r-Jak3/simple_http_server/actions/workflows/docker.yml/badge.svg)](https://github.com/Cyb3r-Jak3/simple_http_server/actions/workflows/docker.yml) [![DeepSource](https://deepsource.io/gh/Cyb3r-Jak3/simple_http_server.svg/?label=active+issues\u0026show_trend=true)](https://deepsource.io/gh/Cyb3r-Jak3/simple_http_server/?ref=repository-badge)[![Go Report Card](https://goreportcard.com/badge/github.com/Cyb3r-Jak3/simple_http_server)](https://goreportcard.com/report/github.com/Cyb3r-Jak3/simple_http_server)\n\nThis is a simple HTTP server which I create while learning about HTTP requests in GoLang. Mocked data is generated using [gofakeit](https://github.com/brianvoe/gofakeit/v6)\n\nReleases are signed with my [release key](https://gist.github.com/Cyb3r-Jak3/8a9ba09406d991d5bab0d677b1af799d)\n\n## Running\n\nTo run this program you can download either the docker image or a [release binary](https://github.com/Cyb3r-Jak3/simple_http_server/releases/latest).\n\n### Customizing\n\n#### Host\n\nBy default the host is `0.0.0.0` and it can be changed with an environment variable of `HOST`\n\n#### Port\n\nBy default the port is `8090` and it can be changed with an environment variable of `PORT`\n\n### Docker\n\nThere are images on both Github and Dockerhub.\n\n**Docker:**\n`docker run -d -p 8090:8090 cyb3rjak3/simple_http_server`\n\n**Github:**\n`docker run -d -p 8090:8090 ghcr.io/cyb3r-jak3/simple_http_server`\n\n## Routes\n\nThe routes that are available are:\n\n### /\n\nReturns a simple hello message\n\n### /headers\n\nEchos back the headers that were sent with the request\n\n### /post/json\n\nEchos back the JSON that was sent with the request\n\n### /post/file/form\n\nSaves a posted multipart/form-data file to the server.\n\n**Required**: The key of the posted file to be \"file\"\n\n### /post/file/{name}\n\nSaves a post binary file with the name\n\n**Required**:\n\n  {name}: Query string set that will set the name of the file\n\n### /get/json/{rows}\n\nReturns a number of JSON rows\n\n**Optional**:\n\n    {rows}: Return the number of rows to generate. Default is 10\n\n### /get/xml/{rows}\n\nReturns a number of XML rows\n\n**Optional**:\n\n    {rows}: Return the number of rows to generate. Default is 10\n\n### /get/ipv4\n\nReturns an IPv4 address\n\n### /get/ipv6\n\nReturns an IPv6 address\n\n### /get/base64\n\nReturns a paragraph that has been base64 encoded\n\n### /get/csv/{rows}\n\nReturns a csv file\n\n**Optional**:\n\n    {rows}: Return the number of rows to generate. Default is 10\n\n### /get/image{type}/{height}/{width}\n\nReturns an image either JPG, PNG or the url to download\n\n**Optional**:\n\n    - {type}: Type to generate. Valid options are url, png, jpg\n    - {height}: Height in pixels of the image\n    - {width}: Width in pixels of the image. If none is given a square image of height will be generated\n\n### /get/uuid\n\nReturns a UUID4 as a string\n\n### /cookies/get\n\nReturns the cookies of the request\n\n### /cookies/set/{name}/{value}\n\nSet a cookie in the response\n\n**Required**:\n\n    - {name}: Name of the Cookie\n    - {value}: Value of the cookie\n\n### /cookies/clear\n\nClears all the cookies from a request\n\n### \"/status/{code}\", StatusCode)\n\nReturn a request with status code\n\n**Optional**:\n    - {code}: HTTP status code to return\n\n### \"/redirect/{code}\"\n\nReturn to the constant domain\n\n**Optional**:\n\n    - {code}: HTTP redirect code between 300 and 307\n\n### \"/auth/basic/{username}/{password}\"\n\nGenerates HTTP Basic auth\n\n**Required**:\n\n    - {username}: User name to login with\n    - {password}: Password to login with\n\n### \"/auth/basic/bad\"\n\nHTTP basic auth with username and password of admin\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyb3r-jak3%2Fsimple_http_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyb3r-jak3%2Fsimple_http_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyb3r-jak3%2Fsimple_http_server/lists"}