{"id":16841655,"url":"https://github.com/kevinpollet/http2-cli","last_synced_at":"2025-03-22T05:31:03.055Z","repository":{"id":34863093,"uuid":"185122997","full_name":"kevinpollet/http2-cli","owner":"kevinpollet","description":"Modern and lightweight command line HTTP/2 client ","archived":false,"fork":false,"pushed_at":"2023-01-04T21:45:30.000Z","size":1449,"stargazers_count":4,"open_issues_count":24,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-26T10:42:14.934Z","etag":null,"topics":["client","command-line","http","http2","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/kevinpollet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-06T04:20:46.000Z","updated_at":"2024-02-15T21:40:29.000Z","dependencies_parsed_at":"2023-01-15T09:39:25.070Z","dependency_job_id":null,"html_url":"https://github.com/kevinpollet/http2-cli","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinpollet%2Fhttp2-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinpollet%2Fhttp2-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinpollet%2Fhttp2-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinpollet%2Fhttp2-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinpollet","download_url":"https://codeload.github.com/kevinpollet/http2-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244912800,"owners_count":20530764,"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","command-line","http","http2","nodejs","typescript"],"created_at":"2024-10-13T12:42:38.787Z","updated_at":"2025-03-22T05:30:58.332Z","avatar_url":"https://github.com/kevinpollet.png","language":"TypeScript","readme":"# http2-cli \u0026middot; [![Build Status](https://dev.azure.com/kevinpollet/http2-cli/_apis/build/status/kevinpollet.http2-cli?branchName=master)](https://dev.azure.com/kevinpollet/http2-cli/_build/latest?definitionId=2\u0026branchName=master) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.md)\n\n\u003e Modern and lightweight command line HTTP/2 client.\n\n## Install\n\n**npm**\n\n```shell\nnpx http2-cli             # Use it once.\nnpm install -g http2-cli  # Install globally.\n```\n\n**yarn**\n\n```shell\nyarn global add http2-cli # Install globally.\n```\n\n## Usage\n\n```shell\nhttp2 \u003cmethod\u003e \u003curl\u003e [headers..]\n\nPositionals:\n  method   HTTP method  [required] [choices: \"DELETE\", \"GET\", \"HEAD\", \"OPTIONS\", \"POST\", \"PUT\", \"PATCH\"]\n  url      HTTP URL to request  [required]\n  headers  HTTP headers to send with the request, e.g. Content-Type:application/json\n\nOptions:\n  --help       Show help  [boolean]\n  --version    Show version number  [boolean]\n  --auth       Specify the authentication credentials  [string]\n  --auth-type  Specify the authentication mechanism  [choices: \"Basic\", \"Bearer\"] [default: \"Basic\"]\n  --insecure   Disable the host SSL/TLS certificate verification  [boolean]\n  --verbose    Display the HTTP response headers  [boolean]\n```\n\n## Examples\n\nHere are some command examples with the corresponding output:\n\n### GET request with basic authentication\n\n```shell\nhttp2 get https://nghttp2.org:443/httpbin/basic-auth/test/test --auth test:test\n\n{\n  \"authenticated\": true,\n  \"user\": \"test\"\n}\n```\n\n### POST request with redirected input\n\n```shell\nhttp2 post https://nghttp2.org:443/httpbin/post Content-Type:application/json \u003c foo.json\n\n{\n  \"args\": {},\n  \"data\": \"{\\n  \\\"bar\\\": \\\"baz\\\"\\n}\\n\",\n  \"files\": {},\n  \"form\": {},\n  \"headers\": {\n    \"Content-Type\": \"application/json\",\n    \"Host\": \"nghttp2.org:443\",\n    \"Transfer-Encoding\": \"chunked\"\n  },\n  \"json\": {\n    \"bar\": \"baz\"\n  },\n  \"origin\": \"129.122.96.213\",\n  \"url\": \"https://nghttp2.org:443/httpbin/post\"\n}\n```\n\n## ️️Docker\n\nFor docker ❤️ you can run `http2-cli` with docker. You can use a prebuilt docker image or build your own. For example the following command run the latest prebuilt docker image of `http2-cli`:\n\n```shell\ndocker run --rm kevinpollet/http2-cli:latest --version\n\nhttp2-cli/1.1.0 linux-x64 node-v12.3.1\n```\n\nWith docker, it's also possible to use Unix redirections and pipes! Try the following commands:\n\n```shell\ndocker run --rm -i kevinpollet/http2-cli:latest post https://nghttp2.org/httpbin/post \u003c foo.json\n\n{\n  \"args\": {},\n  \"data\": \"{\\n  \\\"bar\\\": \\\"baz\\\"\\n}\\n\",\n  \"files\": {},\n  \"form\": {},\n  \"headers\": {\n    \"Host\": \"nghttp2.org:443\",\n    \"Transfer-Encoding\": \"chunked\"\n  },\n  \"json\": {\n    \"bar\": \"baz\"\n  },\n  \"origin\": \"129.122.96.213\",\n  \"url\": \"https://nghttp2.org:443/httpbin/post\"\n}\n\necho -e '{ \"hello\": \"world\" }' | docker run --rm -i kevinpollet/http2-cli:latest post https://nghttp2.org/httpbin/post | jq \".json\"\n\n{\n  \"hello\": \"world\"\n}\n```\n\n## Contributing\n\nContributions are welcome!\n\nWant to file a bug, request a feature or contribute some code?\n\nCheck out the [contribution guidelines](./CONTRIBUTING.md).\n\n## License\n\n[MIT](./LICENSE.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinpollet%2Fhttp2-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinpollet%2Fhttp2-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinpollet%2Fhttp2-cli/lists"}