{"id":15678969,"url":"https://github.com/cedric05/dothttp","last_synced_at":"2026-04-01T20:35:32.133Z","repository":{"id":37651062,"uuid":"334099247","full_name":"cedric05/dothttp","owner":"cedric05","description":"dsl for http. https://marketplace.visualstudio.com/items?itemName=ShivaPrasanth.dothttp-code","archived":false,"fork":false,"pushed_at":"2026-01-09T00:43:01.000Z","size":1275,"stargazers_count":16,"open_issues_count":16,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-02T22:55:10.047Z","etag":null,"topics":["command-line","command-line-tool","curl","dsl","hacktoberfest","http","http-client","httpclient","open-source","opensource","python3","textx"],"latest_commit_sha":null,"homepage":"https://docs.dothttp.dev/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cedric05.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"patreon":"prasanth"}},"created_at":"2021-01-29T09:39:06.000Z","updated_at":"2025-11-24T04:20:58.000Z","dependencies_parsed_at":"2023-10-27T14:28:49.472Z","dependency_job_id":"e9a27882-6ee0-45ea-9733-387e994d1373","html_url":"https://github.com/cedric05/dothttp","commit_stats":null,"previous_names":[],"tags_count":126,"template":false,"template_full_name":null,"purl":"pkg:github/cedric05/dothttp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedric05%2Fdothttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedric05%2Fdothttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedric05%2Fdothttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedric05%2Fdothttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cedric05","download_url":"https://codeload.github.com/cedric05/dothttp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedric05%2Fdothttp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31022410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T04:58:43.976Z","status":"ssl_error","status_checked_at":"2026-03-27T04:58:17.966Z","response_time":164,"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":["command-line","command-line-tool","curl","dsl","hacktoberfest","http","http-client","httpclient","open-source","opensource","python3","textx"],"created_at":"2024-10-03T16:25:39.554Z","updated_at":"2026-03-27T05:05:21.660Z","avatar_url":"https://github.com/cedric05.png","language":"Python","readme":"# Inspiration\n\nWith the rise in usage of microservices, Making http requests is essential job of most devs. For these, there are multiple options like curl, insomnia postman. My Ideal choice is to use curl but problems with it is, having no history and no easy way to save and rerun. Postman solves that problem, but once user logs in(earlier it used to be optional, now its mandatory), it stores all request metadata(body/headers/urls/credentails) to their servers although it helps solve using it across multiple devices, backup but it could be potential security loop hole if they can access it. (now a days, postman desktop is super slow also).\n\nThis project aims to solve save\u0026reuse requests, maintaining history and no sync in proprietery servers (although you can achive sync via commiting http files into git).\n\n## GOAL\n\ndothttp will provide simple, cleaner architecture for making http requests. It uses xtext (eclipse developed dsl) to build a custom dsl.\n\n\n### Documentation\n\nMore information or docs can be cound at https://docs.dothttp.dev\n\n\n---\nGo through this example for better understanding. for babysteps click [here](#first-dothttprequest-and-more)\n```http\n# users.http\n\n#!/usr/bin/env /home/prasanth/cedric05/dothttp/dist/dothttp-cli\n\nvar name=adam; // this is how variable is created;\nvar username='username'; \nvar password='password';\n\n# this is comment\n\n// this is also a comment\n\n/*\n   this is multi line\n   comment\n*/\n\n# http file can have multiple requests, name tag/annotation is used to identify\n@name(\"fetch 100 users, skip first 50\")\n\n# makes are get request, with url `https://req.dothttp.dev/user`\nGET https://req.dothttp.dev/user\n\n# below is an header example\n\"Authorization\": \"Basic dXNlcm5hbWU6cGFzc3dvcmQ=\"\n\n# below is how you set url params '?' --\u003e signifies url quary param\n? (\"fetch\", \"100\") #\n? (\"skip\", \"50\")\n? projection, name\n? projection, org\n? projection, location\n\n\n\n\n# makes are post request, with url `https://req.dothttp.dev/user`\nPOST https://req.dothttp.dev/user\n\nbasicauth('username', 'password')\n/*\n   below defines payload for the post request.\n   json --\u003e signifies payload is json data\n*/\njson({\n    \"name\": \"{{name}}\", # name is templated, if spcified via env or property, it will be replaced\n    \"org\": \"dothttp\",\n    \"location\": \"Hyderabad\",\n    # \"interests\": [\"exploring\", \"listening to music\"],\n})\n\n\n\n# makes put request, with url `https://req.dothttp.dev/user/1`\nPUT https://req.dothttp.dev/post\n\n# define headers in .dothttp.json with env\nbasicauth(\"{{username}}, \"{{password}}\")\n\n# posts with urlencoded\nurlencoded({\n    \"name\": \"Adam A\",\n    \"org\": \"dothttp\",\n    \"location\": \"Hyderabad\",\n    \"interests\": [\"exploring\", \"listening to music\"],\n})\n\n// or use below one\n// data('name=Adam+A\u0026org=dothttp\u0026location=Hyderabad\u0026interests=%5B%27exploring%27%2C+%27listening+to+music%27%5D')\n```\n\n## KICKSTART\n\n### From pypi\n\n```shell\npip install dothttp-req==0.0.10\n```\n\n### From source\n\n```shell\ngit clone git@github.com:cedric05/dothttp.git\ncd dothttp\n\npython3 -m pip install pipenv\npipenv install\n```\n\n### python3.9\n\n```shell\npython3 -m dothttp examples/dothttpazure.http\n```\n\n### docker\n\n```shell\ndocker build -t dothttp .\ndocker run -it --rm dothttp\n```\n\n### whalebrew\n\n```shell\ndocker run -it --rm dothttp\n```\n\n## Features\n\n1. easy and cleaner http syntax\n1. variable substitution with property file\n1. generates curl from http for easy sharing\n\n```shell\ndocker build -t dothttp .\nwhalebrew install dothttp\ndothttp examples/dothttpazure.http\n```\n\n## First DotHttpRequest and more\n\n```get.http\nGET \"http://localhost:8000/get\"\n```\n\n`dothttp get.http`  or `python -m dothttp get.http`\n\n## Run\n\n`dothttp simple.http`\n\nprints\n\n```json\n{\n  \"args\": {},\n  \"headers\": {\n    \"Accept-Encoding\": \"identity\",\n    \"Host\": \"httpbin.org\",\n    \"User-Agent\": \"python-urllib3/1.26.3\",\n    \"X-Amzn-Trace-Id\": \"Root=1-6022266a-20fb552e530ba3d90c75be6d\"\n  },\n  \"origin\": \"117.216.243.24\",\n  \"url\": \"http://localhost:8000/get\"\n}\n```\n\n### POST request\n\n```post.http\nPOST \"http://localhost:8000/post\"\n```\n\n```json\n{\n  \"args\": {},\n  \"data\": \"\",\n  \"files\": {},\n  \"form\": {},\n  \"headers\": {\n    \"Accept-Encoding\": \"identity\",\n    \"Content-Length\": \"0\",\n    \"Host\": \"httpbin.org\",\n    \"User-Agent\": \"python-urllib3/1.26.3\",\n    \"X-Amzn-Trace-Id\": \"Root=1-602228fa-3c3ed5213b6d8c2d2a223148\"\n  },\n  \"json\": null,\n  \"origin\": \"117.216.243.24\",\n  \"url\": \"http://localhost:8000/post\"\n}\n```\n\nsimilarly, other methods`GET, POST, OPTIONS, DELETE, CONNECT, PUT, HEAD, TRACE` support is available.\n\n### Query\n\nquery params can be added to request by specifying\n` query ( \"key\", \"value\")`\n` ?  \"key\", \"value\"`\n` ? \"key\": \"value\"`\n` ? \"key\"= \"value\"`\nall four are accepted. going with `query(\"hi\", \"hi2)` is more readable. `?\"key\"= \"value\"` is more concise\n\n### Payload\n\nuser can specify payload by mentioning below four forms (for various scenarios).\n\n- `data(\"ram\")`\n\n  user can also mention its `content-type` with\n  `data(\"ram\", \"text/plain\")`\n- `urlencoded({\"key\": \"value\"})` for form input.\n- `json({\"key\": \"value\"})` for json payload.\n- `fileinput(\"path/to/file\", \"type\")` uploads file as payload (type is optional).\n- `files((\"photo\", \"path/to/file/photo.jpg\", \"image/jpeg\"),\n  (\"photo details\", '{\"name\":\"prasanth\"}', \"application/json\")   \n  )`\n\n  for multipart upload\n  **dothttp** will figure out content type by going through file/data, when type is not mentioned.\n\n### Comments\n\n**dothttp** will use `#` for commenting entire line.\n\n1. `//` line comment. follows java, javascript\n2. `#` line comment. follows python's comment style\n3. `/*\n   */` multi line comment. follows java/javascript style\n\n### Templating\n\n```.http\nPOST 'http://localhost:8000/post'\n? (\"{{key}}\", \"{{value}}\")\ndata('{\"{{key}}\" :\"{{value}}\"}', 'application/json')\n```\n\n- specify variable values through property file ([sample.json](./examples/.dothttp.json)).\n    - user can define environments and can activate multiple environments at a time\n    - **dothttp** by default will read variables from `\"*\"` section\n    - for example\n      `dothttp --property-file path/to/file.json --env ram chandra`\n\n      will activate `*` section properties, `ram` section properties and `chandra` section properties\n      `dothttp --env ram chandra`\n      will activate `*` section properties, `ram` section properties and `chandra` section properties\n      from `.dothttp.json` in httpfile name space\n- through command line\n  `dothttp --property key=ram value=ranga`\n  will replace `{{ram}}` to `ranga` from the file\n- through file itself. (will be helpful for default properties)\n\n```\nPOST 'https://{{host=httpbin.org}}/post'\n```\n\n### Headers\n\nUser can define headers in below three formats\n\n1. `header('content-type', 'application/json')` readable\n2. `'content-type': 'application/json'` concise\n3. property file `headers` section from property-file can also be used. in most scenarios, headers section will be\n   common for a host. having them in property file would ease them.\n\n### Authentication\n\n#### BasicAuth\n`basicauth('username','password')'` --\u003e will compute add respective headers.\n\n#### DigestAuth\n`digestauth('username','password')'` --\u003e will compute add respective headers.\n\n#### NtlmAuth\n`ntlmauth('username','password')'` --\u003e will compute add respective headers.\n\n### Property file\n\n```json\n{\n  \"*\": {\n    \"host\": \"httpbin.org\"\n  },\n  \"headers\": {\n    \"content-type\": \"plain/text\"\n  },\n  \"preprod\": {\n    \"host\": \"preprod.httpbin.org\"\n  }\n}\n```\n\n#### Special sections in property file\n\n1. `*` section in property file will be activated once user specifies property file if user didn't specifiy file\n   and `.dothttp.json` exists, it will be activated\n2. `headers` once a property file is activated. headers from property file will be added to request by default without\n   user having to specify in `.http` file\n\n#### Formatter (experimental phase)\n\n**dothttp** can format a http file using below command\n`dothttp -fmt examples/dothttpazure.http --experimental`\nor\n`dothttp --format examples/dothttpazure.http --experimental`\n\nto print to command line\n\n`dothttp --format examples/dothttpazure.http --experimental --stdout`\n\n### Editor support\n\nsyntax highlighting for visual studio code is supported\nvia [dothttp-code](https://marketplace.visualstudio.com/items?itemName=ShivaPrasanth.dothttp-code)\n\n### Command line options\n\n```\nusage: dothttp [-h] [--curl] [--property-file PROPERTY_FILE] [--no-cookie] [--env ENV [ENV ...]] [--debug] [--info] [--format] [--stdout]\n               [--property PROPERTY [PROPERTY ...]]\n               file\n\nhttp requests for humans\n\noptional arguments:\n  -h, --help            show this help message and exit\n\ngeneral:\n  --curl                generates curl script\n  --no-cookie, -nc      cookie storage is disabled\n  --debug, -d           debug will enable logs and exceptions\n  --info, -i            more information\n  file                  http file\n\nproperty:\n  --property-file PROPERTY_FILE, -p PROPERTY_FILE\n                        property file\n  --env ENV [ENV ...], -e ENV [ENV ...]\n                        environment to select in property file. properties will be enabled on FIFO\n  --property PROPERTY [PROPERTY ...]\n                        list of property's\n\nformat:\n  --format, -fmt        formatter\n  --stdout              print to commandline\n```\n\ncheckout [examples]('./examples/dothttpazure.http')\n\n-----------\n### Vscode alternatives\n\n- [rest-client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) written in typescript\n- [httpYac](https://marketplace.visualstudio.com/items?itemName=anweber.vscode-httpyac)  written in typescript\n- [Thunder Client](https://marketplace.visualstudio.com/items?itemName=rangav.vscode-thunder-client) closed source\n\n---------\n### Non Vscode alternatives\n- [http-client](https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html)  closed source\n- [dothttp](https://github.com/tonsV2/dothttp)  written in python\n\n","funding_links":["https://patreon.com/prasanth"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedric05%2Fdothttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcedric05%2Fdothttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedric05%2Fdothttp/lists"}