{"id":20615437,"url":"https://github.com/g-harel/http","last_synced_at":"2025-03-06T18:45:19.455Z","repository":{"id":57605484,"uuid":"147585801","full_name":"g-harel/http","owner":"g-harel","description":"partial http/1.0 client and server implementations","archived":false,"fork":false,"pushed_at":"2019-01-28T19:31:38.000Z","size":3046,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T04:18:09.059Z","etag":null,"topics":["client","file-server","http"],"latest_commit_sha":null,"homepage":"","language":"Go","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/g-harel.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}},"created_at":"2018-09-05T22:17:49.000Z","updated_at":"2022-09-14T20:06:47.000Z","dependencies_parsed_at":"2022-08-27T22:40:51.487Z","dependency_job_id":null,"html_url":"https://github.com/g-harel/http","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/g-harel%2Fhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-harel%2Fhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-harel%2Fhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/g-harel%2Fhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/g-harel","download_url":"https://codeload.github.com/g-harel/http/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242269117,"owners_count":20100071,"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":["client","file-server","http"],"created_at":"2024-11-16T11:15:14.194Z","updated_at":"2025-03-06T18:45:19.427Z","avatar_url":"https://github.com/g-harel.png","language":"Go","readme":"\u003c!--\n\nTODO\n- add timeouts for both client and server implementations\n- add worker pool to handle requests instead of being sequential\n\n--\u003e\n\n# http\n\n[![](https://godoc.org/github.com/g-harel/http?status.svg)](http://godoc.org/github.com/g-harel/http)\n\n_This project contains solutions for the [first two assignments](./assignments) for the `Data Communications \u0026 Computer Networks` course._\n\nThe parent directory is a package exposing partial `http/1.0` client and server implementation similar to [`net/http`](https://golang.org/pkg/net/http/).\n\nThe [`./httpc`](./httpc) and [`./httpfs`](./https) directories contain a _curl-like_ command line tool and a simple file server respectively.\n\n## httpc\n\n```\n$ go get -u github.com/g-harel/http/httpc\n```\n\n#### get\n\n```\nExecutes a HTTP GET request for a given URL.\n\nUsage:\n    httpc get [-v] [-h key:value] [-o filename] URL\n\nFlags:\n   -v             Prints the detail of the response such as protocol, status, and headers.\n   -h key:value   Associates headers to HTTP Request with the format 'key:value'.\n   -o filename    Writes response body to specified file.\n```\n\n#### post\n\n```\nExecutes a HTTP POST request for a given URL with inline data or from file.\n\nUsage:\n   httpc post [-v] [-h key:value] [-d inline-data] [-f file] [-o filename] URL\n\nFlags:\n   -v             Prints the detail of the response such as protocol, status, and headers.\n   -h key:value   Associates headers to HTTP Request with the format 'key:value'.\n   -d string      Associates an inline data to the body HTTP POST request.\n   -f filename    Associates the content of a file to the body HTTP POST request.\n   -o filename    Writes response body to specified file.\n```\n\n_Either `-d` or `-f` can be used but not both._\n\n## httpfs\n\n```\n$ go get -u github.com/g-harel/http/httpfs\n```\n\n```\nStarts a simple file server.\n\nUsage:\n   httpfs [-v] [-p port] [-d directory]\n\nFlags:\n   -v             Prints debugging messages.\n   -p port        Specifies the port for the server to listen to (default \"8080\").\n   -d directory   Specifies the file server's root directory (default \".\").\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-harel%2Fhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fg-harel%2Fhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fg-harel%2Fhttp/lists"}