{"id":17472833,"url":"https://github.com/shinnn/fettuccine-class","last_synced_at":"2026-05-19T06:06:01.400Z","repository":{"id":57234814,"uuid":"48427682","full_name":"shinnn/fettuccine-class","owner":"shinnn","description":"A class to create a new fettuccine wrapper that defaults to the given options","archived":false,"fork":false,"pushed_at":"2018-09-13T05:28:14.000Z","size":111,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T15:53:49.852Z","etag":null,"topics":["class","fetch","http","https","javascript","nodejs","promise","request"],"latest_commit_sha":null,"homepage":"https://github.com/shinnn/fettuccine","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:11:18.000Z","updated_at":"2018-09-13T05:28:15.000Z","dependencies_parsed_at":"2022-09-07T12:02:43.708Z","dependency_job_id":null,"html_url":"https://github.com/shinnn/fettuccine-class","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/shinnn/fettuccine-class","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffettuccine-class","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffettuccine-class/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffettuccine-class/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffettuccine-class/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/fettuccine-class/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffettuccine-class/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264248024,"owners_count":23579059,"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":["class","fetch","http","https","javascript","nodejs","promise","request"],"created_at":"2024-10-18T17:37:57.169Z","updated_at":"2026-05-19T06:05:56.379Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fettuccine-class\n\n[![npm version](https://img.shields.io/npm/v/fettuccine-class.svg)](https://www.npmjs.com/package/fettuccine-class)\n[![Build Status](https://travis-ci.org/shinnn/fettuccine-class.svg?branch=master)](https://travis-ci.org/shinnn/fettuccine-class)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/fettuccine-class.svg)](https://coveralls.io/github/shinnn/fettuccine-class)\n\nA [class](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes) to create a new [`fettuccine`](https://github.com/shinnn/fettuccine) wrapper that defaults to given options.\n\nBasically end users would rather use `fettuccine` directly, which covers most use cases. `fettucine-class` is designed for library authors to create an HTTP client interacting with a specific web service or API.\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-class\n```\n\n## API\n\n```javascript\nconst Fettuccine = require('fettuccine-class');\n```\n\n### instance = new Fettuccine([*options*])\n\n*options*: `Object` (used as default options of instance methods)  \nReturn: `Object`\n\n### instance.fetch(*url* [, *options*])\n\nSame as [`fettuccine()`](https://github.com/shinnn/fettuccine#fettuccineurl--options), but uses options passed to the constructor by default.\n\n```javascript\nconst packageInfo = new Fettuccine({\n  baseUrl: 'https://registry.npmjs.org/'\n});\n\n(async () =\u003e {\n  const {description} = await (await packageInfo.fetch('npm')).json();\n  //=\u003e 'a package manager for JavaScript'\n})();\n```\n\n### instance.delete(*url* [, *options*]), instance.get(*url* [, *options*]),, instance.head(*url* [, *options*]), instance.patch(*url* [, *options*]), instance.post(*url* [, *options*]), instance.put(*url* [, *options*])\n\nSet `options.method` to the corresponding method name and call `instance.fetch()`. In those function `options.method` is not configurable.\n\n### instance.option\n\nDefault options used by `instance.fetch()`.\n\n## License\n\n[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Ffettuccine-class","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Ffettuccine-class","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Ffettuccine-class/lists"}