{"id":20183249,"url":"https://github.com/martonlederer/summon","last_synced_at":"2025-08-14T00:16:49.868Z","repository":{"id":115972421,"uuid":"280951036","full_name":"martonlederer/summon","owner":"martonlederer","description":"An elegant requests library for Deno","archived":false,"fork":false,"pushed_at":"2020-07-21T09:44:07.000Z","size":24,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-17T12:51:32.745Z","etag":null,"topics":["axios","deno","nest","request"],"latest_commit_sha":null,"homepage":"https://nest.land/package/summon","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/martonlederer.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":"2020-07-19T21:09:25.000Z","updated_at":"2021-10-25T03:42:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"870e7a9b-a96d-4602-bf2e-16b515ce0b11","html_url":"https://github.com/martonlederer/summon","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/martonlederer/summon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martonlederer%2Fsummon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martonlederer%2Fsummon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martonlederer%2Fsummon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martonlederer%2Fsummon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martonlederer","download_url":"https://codeload.github.com/martonlederer/summon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martonlederer%2Fsummon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270337774,"owners_count":24566996,"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-08-13T02:00:09.904Z","response_time":66,"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":["axios","deno","nest","request"],"created_at":"2024-11-14T02:44:41.933Z","updated_at":"2025-08-14T00:16:49.210Z","avatar_url":"https://github.com/martonlederer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# summon\n\n [![nest badge](https://nest.land/badge.svg)](https://nest.land/package/summon) ![summon build](https://img.shields.io/github/workflow/status/MartonDev/summon/CI%20check)\n\n An elegant requests library for Deno, modelled after [axios](https://npmjs.org/package/axios)\n\n## What is summon?\n Summon provides an elegant, more readable interface to the Deno fetch API for making requests. It's codebase and layout is modelled after [axios](https://npmjs.org/package/axios), but is more lightweight and uses a golang inspired return sytax.\n\n## Usage\n First import the module from [nest.land](https://nest.land/package/summon):\n ```ts\n import { summon } from 'https://x.nest.land/summon@0.0.1/mod.ts'\n ```\n\n A simple summon `GET` request looks like this:\n\n ```ts\n const { response, error } = await summon.get('https://example.com', { params: {\n\n   page: 1,\n   testparam: true\n\n }}) // get request with custom config\n ```\n You can also access all requests with their respective lowercase shortcuts\n \n ```ts\n const { res } = await summon.post('https://example.com/post', { // you can also use shortcuts to response and error (res, err)\n\n   title: 'test',\n   description: 'This is a test description for a new post'\n\n })\n // or\n const { res } = await summon.put(...)\n const { res } = await summon.delete(...)\n const { res } = await summon.patch(...)\n const { res } = await summon.options(...)\n const { res } = await summon.head(...)\n const { res } = await summon.connect(...)\n const { res } = await summon.trace(...)\n ```\n\n## Summon API\n Like axios, summon has it's own API for maximum configuration and readability\n\n ```ts\n const { response, error } = await summon('/test', {\n\n  baseURL: 'https://example.com', // the base URL of the request. If this is not undefined, the library will concat the url to the value of this field. In this request, the baseURL and the url will be concated to https://example.com/test\n  method: 'post', // 'get' | 'post' | 'put' | 'delete' | 'options' | 'head' | 'connect' | 'trace' | 'patch'\n  headers: {\n\n    'Accept': 'application/xml', // accept only xml response\n    'Content-Type': 'application/json'\n\n  },\n  params: {\n\n    page: 2 // this will be concated to \"?page=2\" and added to the request url\n\n  },\n  validateStatus: (status) =\u003e (status \u003e= 200 \u0026\u0026 status \u003c 210), // validate the returned status. In this example, if the status code is greater than 210, the result gives an error\n  timeout: 100, // after how many milliseconds should the request timeout. Default is 0\n  throwErrorOnTimeout: true // weather the library should throw an error on timeout (this will terminate your app, because of the way Deno behaves) Default: false\n  auth: { username: 'test', password: 'password' }, // submit a base64 encoded auth request\n  data: { somevalue: true }, // the request body \n  abortController: // an AbortController object that you can use to cancel/abort your request\n\n })\n ```\n You can even put the URL inside the config object\n ```ts\n const { res, err } = await summon({\n\n  url: 'https://example.com/',\n  ...\n\n })\n ```\n\n### Instance\n You can create an instance of summon with the `create()` function\n ```ts\n const INSTANCE = summon.create({ baseURL: 'https://api.github.com/' })\n ```\n\n# License\nLicensed under the [MIT License](https://github.com/MartonDev/summon/blob/master/LICENSE)\nContributions are welcome. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartonlederer%2Fsummon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartonlederer%2Fsummon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartonlederer%2Fsummon/lists"}