{"id":17472538,"url":"https://github.com/shinnn/fettuccine","last_synced_at":"2025-07-30T19:36:39.397Z","repository":{"id":57234808,"uuid":"48428358","full_name":"shinnn/fettuccine","owner":"shinnn","description":"HTTP client with every imaginable option and small file size","archived":false,"fork":false,"pushed_at":"2018-10-31T10:54:20.000Z","size":52,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-18T19:57:03.994Z","etag":null,"topics":["get","http","https","lightweight","promise","request"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinnn.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}},"created_at":"2015-12-22T11:28:13.000Z","updated_at":"2020-03-02T19:49:19.000Z","dependencies_parsed_at":"2022-09-07T12:02:38.084Z","dependency_job_id":null,"html_url":"https://github.com/shinnn/fettuccine","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffettuccine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffettuccine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffettuccine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffettuccine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/fettuccine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125581,"owners_count":21051768,"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":["get","http","https","lightweight","promise","request"],"created_at":"2024-10-18T17:26:15.194Z","updated_at":"2025-04-09T23:02:26.950Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fettuccine\n\n[![npm version](https://img.shields.io/npm/v/fettuccine.svg)](https://www.npmjs.com/package/fettuccine)\n[![Build Status](https://travis-ci.org/shinnn/fettuccine.svg?branch=master)](https://travis-ci.org/shinnn/fettuccine)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/fettuccine.svg)](https://coveralls.io/github/shinnn/fettuccine?branch=master)\n[![Dependency Status](https://david-dm.org/shinnn/fettuccine.svg)](https://david-dm.org/shinnn/fettuccine)\n[![devDependency Status](https://david-dm.org/shinnn/fettuccine/dev-status.svg)](https://david-dm.org/shinnn/fettuccine#info=devDependencies)\n\nA simplified HTTP client for [Node](https://nodejs.org/)\n\n* with the [Promise API](https://promisesaplus.com/)\n* and [every imaginable option](https://github.com/request/request#requestoptions-callback) thanks to [Request](https://github.com/request/request),\n* nevertheless, keeping [small package size](https://github.com/shinnn/load-request-from-cwd-or-npm#why) by [economical module loading](https://github.com/shinnn/load-request-from-cwd-or-npm)\n\n```javascript\nconst fettuccine = require('fettuccine');\n\n(async () =\u003e {\n  const response = await fettuccine('https://api.github.com/users/isaacs/repos', {\n    qs: {sort: 'created'},\n    json: true\n  });\n\n  response.body[0]; //=\u003e {id: 46883374, name: 'pseudomap', ...}\n})();\n```\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/getting-started/what-is-npm).\n\n```\nnpm install fettuccine\n```\n\n## API\n\n```javascript\nconst fettuccine = require('fettuccine');\n```\n\n### fettuccine(*url* [, *options*])\n\n*url*: `string` (URL to send a request)  \n*options*: `Object` (used as [`Request` options][request] with [`gzip`](https://github.com/request/request/blob/288f814e71efdd70f852888c1701c5cf3d177da5/request.js#L913-L928) defaulting to `true`)  \nReturn: `Promise\u003cObject\u003e`\n\nIt makes an HTTP or HTTPS request to the given URL.\n\nWhen the request finishes, it will be [*fulfilled*](https://promisesaplus.com/#point-26) with the  [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_http_incomingmessage) object with the additional [`body` property][request]:\n\n\u003e `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)\n\nWhen the request fails, it will be [*rejected*](https://promisesaplus.com/#point-30) with an error object (usually from [`http.ClientRequest`](https://nodejs.org/api/http.html#http_class_http_clientrequest) object).\n\n### fettuccine.get()\n\nAlias of [`fettuccine()`][fettucine].\n\n### fettuccine.post(), fettuccine.put(), fettuccine.patch(), fettuccine.head(), fettuccine.delete()\n\nSet `options.method` to the method name and call [`fettuccine()`][fettucine].\n\n```javascript\nconst fettuccine = require('fettuccine');\n\n// With `fettuccine()`\n(async () =\u003e {\n  await fettuccine('https://awesome-webservice.com/api', {\n    method: 'POST',\n    body: imageBuffer\n  });\n\n  console.log('Uploaded an image.')\n})();\n\n// With `fettuccine.post()`\n(async () =\u003e {\n  await fettuccine.post('https://awesome-webservice.com/api', {\n    body: imageBuffer\n  });\n\n  console.log('Uploaded an image.')\n})();\n```\n\n### fettuccine.Fettuccine([*options*])\n\nThe [`Fettuccine` class](https://github.com/shinnn/fettuccine-class).\n\n## License\n\n[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe\n\n[request]: https://github.com/request/request#requestoptions-callback\n[fettucine]: https://github.com/shinnn/fettuccine#fettuccineurl--options\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Ffettuccine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Ffettuccine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Ffettuccine/lists"}