{"id":27400098,"url":"https://github.com/nitrog0d/nitro-http-client","last_synced_at":"2025-04-14T03:26:23.284Z","repository":{"id":143897255,"uuid":"357614132","full_name":"nitrog0d/nitro-http-client","owner":"nitrog0d","description":"A HTTP client module I made because I can't deal with other modules","archived":false,"fork":false,"pushed_at":"2023-12-08T19:30:45.000Z","size":11,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T09:18:16.346Z","etag":null,"topics":["http","http-client","http-request","nodejs"],"latest_commit_sha":null,"homepage":"https://nitro.moe","language":"TypeScript","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/nitrog0d.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}},"created_at":"2021-04-13T16:08:47.000Z","updated_at":"2023-05-04T20:49:17.000Z","dependencies_parsed_at":"2023-09-23T04:15:33.538Z","dependency_job_id":null,"html_url":"https://github.com/nitrog0d/nitro-http-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrog0d%2Fnitro-http-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrog0d%2Fnitro-http-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrog0d%2Fnitro-http-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrog0d%2Fnitro-http-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitrog0d","download_url":"https://codeload.github.com/nitrog0d/nitro-http-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248814858,"owners_count":21165841,"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":["http","http-client","http-request","nodejs"],"created_at":"2025-04-14T03:26:22.861Z","updated_at":"2025-04-14T03:26:23.272Z","avatar_url":"https://github.com/nitrog0d.png","language":"TypeScript","readme":"# nitro-http-client\n[![npm release](https://img.shields.io/npm/dt/nitro-http-client?style=for-the-badge)](https://www.npmjs.com/package/nitro-http-client)\n[![Support me on Patreon](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F1177520\u0026query=data.attributes.patron_count\u0026suffix=%20Patrons\u0026color=FF5441\u0026label=Patreon\u0026logo=Patreon\u0026logoColor=FF5441\u0026style=for-the-badge)](https://patreon.com/nitrog0d)\n\nA HTTP client module I made because I can't deal with other modules  \nIt does not support/handle compression, I'll eventually implement it according to my needs\n\n## Installation\n\n* NPM: `npm install nitro-http-client`  \n* Yarn: `yarn add nitro-http-client`\n\n## Usage\n\n### JavaScript\n**Create the client**\n```js\nconst { NitroHttpClient } = require('nitro-http-client');\nconst httpClient = new NitroHttpClient();\n```\n\n### TypeScript\n**Create the client**\n```ts\nimport { NitroHttpClient } from 'nitro-http-client';\nconst httpClient = new NitroHttpClient();\n```\n\n### Examples\n**Example with default values, no body, GET method, no extra headers**\n```js\nconst response = await httpClient.request('https://example.com');\nconsole.log(response.statusCode);\n```\n\n**.then example since it returns a Promise**\n```js\nhttpClient.request('https://example.com').then(response =\u003e {\n  console.log(response.body);\n});\n\n```\n**Example with custom values**\n```js\nconst response = await httpClient.request('https://example.com', {\n  method: 'POST',\n  headers: {\n    Authentication: '123',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({ test: 123 })\n});\nconsole.log(response.headers);\n```\n","funding_links":["https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fwww.patreon.com%2Fapi%2Fcampaigns%2F1177520\u0026query=data.attributes.patron_count\u0026suffix=%20Patrons\u0026color=FF5441\u0026label=Patreon\u0026logo=Patreon\u0026logoColor=FF5441\u0026style=for-the-badge","https://patreon.com/nitrog0d"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitrog0d%2Fnitro-http-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitrog0d%2Fnitro-http-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitrog0d%2Fnitro-http-client/lists"}