{"id":20972051,"url":"https://github.com/fabulator/cookie-api-handler","last_synced_at":"2026-07-03T00:31:42.017Z","repository":{"id":32421010,"uuid":"132447091","full_name":"fabulator/cookie-api-handler","owner":"fabulator","description":"Cookies for rest-api-handler","archived":false,"fork":false,"pushed_at":"2024-03-31T23:22:17.000Z","size":5118,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-01T00:24:04.602Z","etag":null,"topics":["api","cookie"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabulator.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2018-05-07T10:50:48.000Z","updated_at":"2024-04-15T00:23:37.063Z","dependencies_parsed_at":"2023-02-16T02:30:37.055Z","dependency_job_id":"4aef6695-743f-4e76-865b-90ae85e6f500","html_url":"https://github.com/fabulator/cookie-api-handler","commit_stats":{"total_commits":280,"total_committers":4,"mean_commits":70.0,"dds":0.5428571428571429,"last_synced_commit":"eb03941a73027c7b6164a6e4df636d1437e92848"},"previous_names":[],"tags_count":95,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabulator%2Fcookie-api-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabulator%2Fcookie-api-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabulator%2Fcookie-api-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabulator%2Fcookie-api-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabulator","download_url":"https://codeload.github.com/fabulator/cookie-api-handler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243366856,"owners_count":20279431,"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":["api","cookie"],"created_at":"2024-11-19T04:06:21.880Z","updated_at":"2026-07-03T00:31:36.967Z","avatar_url":"https://github.com/fabulator.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cookie API Handler\n\n[![npm version](https://badge.fury.io/js/cookie-api-handler.svg)](https://badge.fury.io/js/cookie-api-handler)\n[![renovate-app](https://img.shields.io/badge/renovate-app-blue.svg)](https://renovateapp.com/)\n[![Known Vulnerabilities](https://snyk.io/test/github/fabulator/cookie-api-handler/badge.svg)](https://snyk.io/test/github/fabulator/cookie-api-handler)\n[![codecov](https://codecov.io/gh/fabulator/cookie-api-handler/branch/master/graph/badge.svg)](https://codecov.io/gh/fabulator/cookie-api-handler)\n[![travis](https://travis-ci.org/fabulator/cookie-api-handler.svg?branch=master)](https://travis-ci.org/fabulator/cookie-api-handler)\n\nExtension of [rest-api-handler](https://github.com/fabulator/rest-api-handler) library. It parse cookies from response headers and use them to send requests.\n\nLibrary is compiled for node 9.6 and include Fetch polyfill.\n\n## How to use it\n\nInstall the library:\n\n```nodedaemon\nnpm install cookie-api-handler\n```\n\nSend requests:\n\n```javascript\nconst CookieApi = require('cookie-api-handler');\n\n(async () =\u003e {\n    const api = new CookieApi('');\n\n    await api.get('https://endomondo.com');\n\n    console.log(api.getCookies());\n})();\n```\n\nFor more information about sending requests, check [base library](https://github.com/fabulator/rest-api-handler).\n\n## How to work with cookies\n\nCookies are inserted to object based on response headers. Class have methods to add custom cookies and read the current ones:\n\n```javascript\n// will return object of decoded strings\napi.getCookies();\n\n\n// you can add custom cookies, string only. Cookies will be encoded.\napi.addCookies({\n    cookieName: 'cookieValue',\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabulator%2Fcookie-api-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabulator%2Fcookie-api-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabulator%2Fcookie-api-handler/lists"}