{"id":18887471,"url":"https://github.com/pdrb/gurl","last_synced_at":"2025-04-14T22:34:03.557Z","repository":{"id":186001803,"uuid":"674455044","full_name":"pdrb/gurl","owner":"pdrb","description":"A simple http client cli written in Go.","archived":false,"fork":false,"pushed_at":"2024-10-03T03:00:50.000Z","size":105,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T10:54:20.411Z","etag":null,"topics":["cli","go","httpclient"],"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/pdrb.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":"2023-08-04T02:02:09.000Z","updated_at":"2024-10-03T02:58:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ce8a714-6ef5-4303-b64b-3fffc7f76863","html_url":"https://github.com/pdrb/gurl","commit_stats":null,"previous_names":["pdrb/gurl"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdrb%2Fgurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdrb%2Fgurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdrb%2Fgurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdrb%2Fgurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdrb","download_url":"https://codeload.github.com/pdrb/gurl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248973260,"owners_count":21191939,"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":["cli","go","httpclient"],"created_at":"2024-11-08T07:37:58.389Z","updated_at":"2025-04-14T22:33:58.525Z","avatar_url":"https://github.com/pdrb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gurl\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/pdrb/gurl)](https://goreportcard.com/report/github.com/pdrb/gurl)\n[![CI](https://github.com/pdrb/gurl/actions/workflows/ci.yml/badge.svg)](https://github.com/pdrb/gurl/actions/workflows/ci.yml)\n[![Release](https://github.com/pdrb/gurl/actions/workflows/release.yml/badge.svg)](https://github.com/pdrb/gurl/actions/workflows/release.yml)\n[![Releases](https://img.shields.io/github/v/release/pdrb/gurl.svg)](https://github.com/pdrb/gurl/releases)\n[![LICENSE](https://img.shields.io/github/license/pdrb/gurl)](https://github.com/pdrb/gurl/blob/main/LICENSE)\n\nA simple http client cli written in Go.\n\nThanks to [req](https://github.com/imroc/req) (and [utls](https://github.com/refraction-networking/utls)) there are some cool features like:\n\n* TLS Fingerprinting\n* HTTP Fingerprinting\n* Basic/Bearer Authentication\n* Custom Certificates\n* Proxy Support\n* Retries\n* Tracing\n\nCheck usage below for full list of supported options.\n\nWhenever possible, the options are similar to `curl` with some sensible defaults applied like `application/json` content type for post, put and patch methods.\n\nAlso, if the response is valid json, it will be automatically prettified (this can be disabled using `--raw-response`).\n\n## Install\n\nInstall compiling from source using Go:\n\n```shell\ngo install github.com/pdrb/gurl@latest\n```\n\nOr download the appropriate pre-built binary from [Releases](https://github.com/pdrb/gurl/releases).\n\n## Usage\n\n```text\nUsage: gurl \u003curl\u003e\n\nA simple http client cli written in Go.\n\nArguments:\n  \u003curl\u003e    Url to access.\n\nFlags:\n  -h, --help                    Show context-sensitive help.\n  -u, --auth=auth               Basic HTTP authentication in the format\n                                username:password.\n  -b, --bearer-token=token      Set bearer auth token.\n      --ca-cert=file            CA certificate file.\n      --client-cert=cert-file,key-file,...\n                                Client cert and key files separated by comma:\n                                \"cert.pem,key.pem\".\n  -c, --content-type=content    Content-Type http header, default is\n                                application/json for POST, PUT and PATCH\n                                methods.\n  -d, --data=payload            Data payload (request body).\n  -f, --data-file=file          Read data payload from file.\n      --disable-redirect        Disable redirects.\n      --force-http-1            Force HTTP/1.1 to be used.\n  -H, --headers=h1=v1;h2=v2     HTTP headers in the format:\n                                \"header1=value1;header2=value2\".\n      --impersonate=\"none\"      Fully impersonate chrome, firefox or safari\n                                browser (this will automatically set headers,\n                                headers order and tls fingerprint).\n  -k, --insecure                Allow insecure SSL connections.\n  -X, --method=\"GET\"            Http method: GET, HEAD, POST, PUT, PATCH,\n                                DELETE or OPTIONS.\n  -o, --output-file=file        Save response to file.\n      --proxy=proxy             Proxy to use, e.g.:\n                                \"http://user:pass@myproxy:8080\".\n      --raw-response            Print raw response string (disable json\n                                prettify).\n  -r, --retries=0               Number of retries in case of errors and http\n                                status code \u003e= 500.\n  -t, --timeout=10000           Timeout in milliseconds.\n      --tls-finger=\"go\"         TLS Fingerprint: chrome, firefox, edge, safari,\n                                ios, android, random or go.\n      --trace                   Show tracing/performance information.\n  -A, --user-agent=agent        Set User-Agent http header.\n  -v, --verbose                 Enable verbose/debug mode.\n  -V, --version                 Show version and exit.\n```\n\n## Example\n\n```text\n$ gurl -X POST 'https://httpbin.org/anything?var1=value1\u0026var2=value2' \\\n    -u user:pass \\\n    -H 'header1=value1;header2=value2' \\\n    -d '{\"user\": \"name\"}' \\\n    -v --trace\n\n2023/09/03 00:21:10.926979 DEBUG [req] HTTP/2 POST https://httpbin.org/anything?var1=value1\u0026var2=value2\n:authority: httpbin.org\n:method: POST\n:path: /anything?var1=value1\u0026var2=value2\n:scheme: https\ncontent-type: application/json; charset=utf-8\nauthorization: Basic dXNlcjpwYXNz\nheader1: value1\nheader2: value2\nuser-agent: gurl 1.5.0\ncontent-length: 16\naccept-encoding: gzip\n\n:status: 200\ndate: Sun, 03 Sep 2023 03:21:12 GMT\ncontent-type: application/json\ncontent-length: 644\nserver: gunicorn/19.9.0\naccess-control-allow-origin: *\naccess-control-allow-credentials: true\n\n{\n  \"args\": {\n    \"var1\": \"value1\",\n    \"var2\": \"value2\"\n  },\n  \"data\": \"{\\\"user\\\": \\\"name\\\"}\",\n  \"files\": {},\n  \"form\": {},\n  \"headers\": {\n    \"Accept-Encoding\": \"gzip\",\n    \"Authorization\": \"Basic dXNlcjpwYXNz\",\n    \"Content-Length\": \"16\",\n    \"Content-Type\": \"application/json; charset=utf-8\",\n    \"Header1\": \"value1\",\n    \"Header2\": \"value2\",\n    \"Host\": \"httpbin.org\",\n    \"User-Agent\": \"gurl 1.5.0\",\n    \"X-Amzn-Trace-Id\": \"Root=1-64f3fba8-52bd3b8337869ce91c0b44d1\"\n  },\n  \"json\": {\n    \"user\": \"name\"\n  },\n  \"method\": \"POST\",\n  \"origin\": \"187.0.34.127\",\n  \"url\": \"https://httpbin.org/anything?var1=value1\u0026var2=value2\"\n}\n\n------- TRACE INFO -------\nTotalTime         : 1.0029421s\nDNSLookupTime     : 6.4776ms\nTCPConnectTime    : 198.6111ms\nTLSHandshakeTime  : 423.5118ms\nFirstResponseTime : 368.5909ms\nResponseTime      : 549.8µs\nIsConnReused:     : false\nRemoteAddr        : 54.175.87.239:443\n\nthe request total time is 1.0029421s, and costs 423.5118ms on tls handshake\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdrb%2Fgurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdrb%2Fgurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdrb%2Fgurl/lists"}