{"id":22087549,"url":"https://github.com/ernesto27/req","last_synced_at":"2025-03-23T22:30:03.131Z","repository":{"id":221849844,"uuid":"743219592","full_name":"ernesto27/req","owner":"ernesto27","description":"CLI to connect to a service,  using different protocols ( http,  graphql,  websocket, grpc )","archived":false,"fork":false,"pushed_at":"2024-03-06T15:43:19.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T05:44:06.536Z","etag":null,"topics":["charm","cli","glamour","golang","graphql","grpc","http","terminal","websocket"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ernesto27.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-01-14T17:30:10.000Z","updated_at":"2024-02-13T18:27:08.000Z","dependencies_parsed_at":"2024-02-12T16:54:49.975Z","dependency_job_id":"2c82809b-7279-44d4-8238-492898565f96","html_url":"https://github.com/ernesto27/req","commit_stats":null,"previous_names":["ernesto27/req"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernesto27%2Freq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernesto27%2Freq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernesto27%2Freq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernesto27%2Freq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ernesto27","download_url":"https://codeload.github.com/ernesto27/req/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245177596,"owners_count":20573127,"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":["charm","cli","glamour","golang","graphql","grpc","http","terminal","websocket"],"created_at":"2024-12-01T02:05:56.663Z","updated_at":"2025-03-23T22:30:03.103Z","avatar_url":"https://github.com/ernesto27.png","language":"Go","readme":"# Req \nCLI that makes a request to a server and displays the body of the response.\nSupport this protocos:\n- HTTP\n- GraphQL\n- Websocket\n- GRPC\n\n# Install\n\nUsing go \n```bash\ngo install github.com/ernesto27/req@latest\n```\n\nUsing brew\n```bash\nbrew install ernesto27/tools/req\n```\n\n\n# Usage \n\n### HTTP \n\nGET\n```bash\nreq -u http://example.com\n```\n\nPOST - send JSON body payload\n```bash\nreq -m post -u https://jsonplaceholder.typicode.com/posts -p '{\"title\": \"foo\", \"body\": \"bar\", \"userId\": 1}'\n```\n\nPOST - send form data\n```bash\nreq -m post  -u https://site.com -p \"foo=bar\u0026jhon=doe\"\n```\n\n### Websocket\n\nListen for messages\n```bash\nreq -t ws -u wss://socketsbay.com/wss/v2/1/demo/\n```\n\nSend message\n```bash\nreq -t ws -p \"some message\"  -u wss://socketsbay.com/wss/v2/1/demo/\n```\n\n\n### Graphql\n\nSend query to graphql server\n```bash \nreq -t gq -u https://countries.trevorblades.com/ -p 'query {countries {name}}'\n```\nUse file to send query\n```bash\nreq -t gq -u https://countries.trevorblades.com/ -p @myfolder/query.txt\n```\n\n\n### GRPC\n\nSend request to grpc server\n```bash\nreq -t grpc -u localhost:50051 -import-path /pathprotofiles/helloworld -proto helloworld.proto -p '{\"name\": \"ernesto\"}' -method helloworld.Greeter.SayHello\n```\n\n\n# Parameters\n\n| Parameter | Description |\n| --- | --- |\n| -u | url server |\n| -m | http method |\n| -p | data to send to server in raw string of use @myfolder/file to send from file  |\n| -t | type protocol (http, ws, gq, grpc) defaut http |\n| -q | http query params |\n| -h | http headers |\n| -v | show server header response |\n| -d | Download response to file|\n| -a | user agent http header |\n| -timeout | seconds value |\n| -import-path | GRPC - path to proto files |\n| -proto | GRPC - proto file name |\n| -method | GRPC - method to call |\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fernesto27%2Freq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fernesto27%2Freq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fernesto27%2Freq/lists"}