{"id":13680063,"url":"https://github.com/zweifisch/ob-http","last_synced_at":"2025-10-10T00:33:46.883Z","repository":{"id":26683102,"uuid":"30139854","full_name":"zweifisch/ob-http","owner":"zweifisch","description":"make http request within org-mode babel","archived":false,"fork":false,"pushed_at":"2024-07-09T16:06:20.000Z","size":66,"stargazers_count":268,"open_issues_count":21,"forks_count":29,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-26T01:08:31.826Z","etag":null,"topics":["curl","http-client","org-babel","org-mode"],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zweifisch.png","metadata":{"files":{"readme":"README.org","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":"2015-02-01T07:40:32.000Z","updated_at":"2025-04-07T14:25:03.000Z","dependencies_parsed_at":"2024-01-14T15:22:27.054Z","dependency_job_id":"5bfd5792-da5f-436f-895f-797da3981f39","html_url":"https://github.com/zweifisch/ob-http","commit_stats":{"total_commits":54,"total_committers":13,"mean_commits":4.153846153846154,"dds":"0.38888888888888884","last_synced_commit":"b1428ea2a63bcb510e7382a1bf5fe82b19c104a7"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/zweifisch/ob-http","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fob-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fob-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fob-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fob-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zweifisch","download_url":"https://codeload.github.com/zweifisch/ob-http/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fob-http/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002360,"owners_count":26083356,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["curl","http-client","org-babel","org-mode"],"created_at":"2024-08-02T13:01:12.665Z","updated_at":"2025-10-10T00:33:46.868Z","avatar_url":"https://github.com/zweifisch.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"* ob-http\n\n[[http://melpa.org/#/ob-http][file:http://melpa.org/packages/ob-http-badge.svg]]\n[[http://stable.melpa.org/#/ob-http][file:http://stable.melpa.org/packages/ob-http-badge.svg]]\n\nhttp request in org-mode babel, requires curl\n\n: #+BEGIN_SRC http :pretty\n: GET https://api.github.com/repos/zweifisch/ob-http/languages\n: Accept: application/vnd.github.moondragon+json\n: #+END_SRC\n: \n: #+RESULTS:\n: : {\n: :   \"Emacs Lisp\": 8170\n: : }\n\n** setup\n\nTo use =ob-http= in an =org-babel= source block, the http language must be enabled in the custom =org-babel-load-languages= alist. Alternatively, running the following snippet during initialization will enable the mode.\n\n#+BEGIN_SRC emacs-lisp\n  (org-babel-do-load-languages\n   'org-babel-load-languages\n   '((emacs-lisp . t)\n     (http . t)))\n#+END_SRC\n\n** options\n\n| option        | curl           | example                                                                                 |\n|---------------+----------------+-----------------------------------------------------------------------------------------|\n| =:proxy=      | =-x=           | =:proxy localhost:8118=                                                                 |\n| =:noproxy=    | =--noproxy *=  | N/A                                                                                     |\n| =:cookie-jar= | =--cookie-jar= | =:cookie-jar username=                                                                  |\n| =:cookie=     | =--cookie=     | =:cookie username=                                                                      |\n| =:max-time=   | =--max-time=   | default is =10=                                                                         |\n| =:user=       | =--user=       | =:user admin:passwd=\n| =:pretty=     | N/A            | =:pretty= use =Content-Type=, to overwrite =:pretty json=                               |\n| =:select=     | N/A            | =:select path= path will be passed to [[https://stedolan.github.io/jq/][jq]] for json or [[https://github.com/EricChiang/pup][pup]] for html or [[http://xmlstar.sourceforge.net/][xmlstarlet]] for xml |\n| =:get-header= | N/A            | =:get-header X-Subject-Token=                                                           |\n| =:curl=       | N/A            | =:curl --insecure --compressed= additional arguments for curl                           |\n| =:resolve=    | =--resolve=    | =:resolve example.com:80:127.0.0.1,example.com:443:127.0.0.1=                           |\n\n** examples\n   \n**** set arbitrary header\n\n: #+BEGIN_SRC http :pretty\n: GET http://httpbin.org/user-agent\n: User-Agent: ob-http\n: #+END_SRC\n: \n: #+RESULTS:\n: : {\n: :   \"user-agent\": \"ob-http\"\n: : }\n\n**** json\n\n: #+BEGIN_SRC http :pretty\n: POST http://httpbin.org/post\n: Content-Type: application/json\n: \n: {\n:   \"key\": \"value\"\n: }\n: #+END_SRC\n: \n: #+RESULTS:\n: #+begin_example\n: {\n:   \"url\": \"http://httpbin.org/post\",\n:   \"json\": {\n:     \"key\": \"value\"\n:   },\n:   \"headers\": {\n:     \"User-Agent\": \"curl/7.35.0\",\n:     \"Host\": \"httpbin.org\",\n:     \"Content-Type\": \"application/json\",\n:     \"Content-Length\": \"18\",\n:     \"Accept\": \"*/*\"\n:   },\n:   \"form\": {},\n:   \"files\": {},\n:   \"data\": \"{  \\\"key\\\": \\\"value\\\"}\",\n:   \"args\": {}\n: }\n: #+end_example\n\n**** form submit\n\n: #+BEGIN_SRC http :pretty\n: PATCH http://httpbin.org/patch\n: \n: key=value\u0026foo=value\n: #+END_SRC\n: \n: #+RESULTS:\n: #+begin_example\n: {\n:   \"url\": \"http://httpbin.org/patch\",\n:   \"origin\": \"116.227.144.38\",\n:   \"json\": null,\n:   \"headers\": {\n:     \"User-Agent\": \"curl/7.35.0\",\n:     \"Host\": \"httpbin.org\",\n:     \"Content-Type\": \"application/x-www-form-urlencoded\",\n:     \"Content-Length\": \"19\",\n:     \"Accept\": \"*/*\"\n:   },\n:   \"form\": {\n:     \"key\": \"value\",\n:     \"foo\": \"value\"\n:   },\n:   \"files\": {},\n:   \"data\": \"\",\n:   \"args\": {}\n: }\n: #+end_example\n\n**** variable\n     \n: #+HEADER: :var name=\"ob-http\"\n: #+HEADER: :var password=\"secret\"\n: #+BEGIN_SRC http :select .json\n: POST http://httpbin.org/post\n: Content-Type: application/json\n: \n: {\n:     \"auth\": {\n:         \"name\": \"${name}\",\n:         \"password\": \"${password}\"\n:     }\n: }\n: #+END_SRC\n: \n: #+RESULTS:\n: : {\n: :   \"auth\": {\n: :     \"password\": \"secret\",\n: :     \"name\": \"ob-http\"\n: :   }\n: : }\n\n**** use properties\n\nsupported headers:\n\n- pretty\n- proxy\n- noproxy\n- cookie\n- schema\n- host\n- port\n- user\n- max-time\n\n: * api test\n: :PROPERTIES:\n: :header-args: :var token=\"secret\" :host httpbin.org :pretty\n: :END:\n: \n: #+BEGIN_SRC http\n: POST /post\n: Content-Type: application/json\n: X-Auth-Token: ${token}\n: #+END_SRC\n: \n: #+RESULTS:\n: #+begin_example\n: {\n:   \"url\": \"http://httpbin.org/post\",\n:   \"json\": null,\n:   \"headers\": {\n:     \"X-Auth-Token\": \"secret\",\n:     \"User-Agent\": \"curl/7.35.0\",\n:     \"Host\": \"httpbin.org\",\n:     \"Content-Type\": \"application/json\",\n:     \"Accept\": \"*/*\"\n:   },\n:   \"form\": {},\n:   \"files\": {},\n:   \"data\": \"\",\n:   \"args\": {}\n: }\n: #+end_example\n\n**** files\n\n: #+BEGIN_SRC http :file zweifisch.jpeg\n: GET https://avatars.githubusercontent.com/u/447862?v=3\n: #+END_SRC\n\n: #+RESULTS:\n: [[file:zweifisch.jpeg]]\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzweifisch%2Fob-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzweifisch%2Fob-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzweifisch%2Fob-http/lists"}