{"id":22533365,"url":"https://github.com/arc-archive/arc-headers","last_synced_at":"2025-08-04T12:06:37.368Z","repository":{"id":40466958,"uuid":"301007880","full_name":"arc-archive/arc-headers","owner":"arc-archive","description":"⛔️ DEPRECATED This component is deprecated. Use `@advanced-rest-client/app` instead.","archived":false,"fork":false,"pushed_at":"2022-09-09T21:17:27.000Z","size":567,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-27T01:51:17.123Z","etag":null,"topics":["deprecated","obsolete"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arc-archive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-04T00:14:33.000Z","updated_at":"2022-05-05T13:47:03.000Z","dependencies_parsed_at":"2022-08-09T21:20:29.913Z","dependency_job_id":null,"html_url":"https://github.com/arc-archive/arc-headers","commit_stats":null,"previous_names":["advanced-rest-client/arc-headers"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/arc-archive/arc-headers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arc-archive%2Farc-headers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arc-archive%2Farc-headers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arc-archive%2Farc-headers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arc-archive%2Farc-headers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arc-archive","download_url":"https://codeload.github.com/arc-archive/arc-headers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arc-archive%2Farc-headers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268693433,"owners_count":24291627,"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-04T02:00:09.867Z","response_time":79,"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":["deprecated","obsolete"],"created_at":"2024-12-07T09:08:01.769Z","updated_at":"2025-08-04T12:06:37.315Z","avatar_url":"https://github.com/arc-archive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deprecated\n\nThis component is deprecated. Use `@advanced-rest-client/app` instead.\n\n----\n\nA module that contains UI and logic for handle HTTP headers in an HTTP request and request editors.\n\n[![Published on NPM](https://img.shields.io/npm/v/@advanced-rest-client/arc-headers.svg)](https://www.npmjs.com/package/@advanced-rest-client/arc-headers)\n\n[![Tests and publishing](https://github.com/advanced-rest-client/arc-headers/actions/workflows/deployment.yml/badge.svg)](https://github.com/advanced-rest-client/arc-headers/actions/workflows/deployment.yml)\n\n## Usage\n\n### Installation\n\n```sh\nnpm install --save @advanced-rest-client/arc-headers\n```\n\n### HeadersParser module\n\nA helper class to process headers as string, array, object, or a Headers object.\n\n```js\nimport { HeadersParser } from '@advanced-rest-client/arc-headers';\nconst errorMessage = HeadersParser.getError('Whitespace Name: x-true');\n```\n\n### HeadersEditorElement\n\nAn HTTP headers editor UI.\n\n```html\n\u003cheaders-editor id=\"editor\"\u003e\u003c/headers-editor\u003e\n\u003cscript\u003e\n{\n  editor.model = [{ name: 'content-type', value: 'application/json', enabled: true }];\n  // or\n  editor.value = 'content-type: application/json';\n  editor.onchange = (e) =\u003e { console.log(e.target.value, e.target.model); }\n}\n\u003c/script\u003e\n```\n\nTry not to use both `value` and `model` when setting the value of the editor. The last set value wins and overrides the other one.\nIf your application uses the headers view model (to add support for enable/disable header state) then only use model. The editor will\nproduce value when anything after setting up the model change. This is done to minimize number of computations when working with the editor.\n\nThe component listens to content type change event (defined in [arc-events](https://github.com/advanced-rest-client/arc-events) as RequestEvents.State.contentTypeChange) and updated the current value when the event is handled.\n\n### HeadersListElement\n\nAn list of formatted HTTP headers.\n\n```html\n\u003cheaders-list id=\"list\"\u003e\u003c/headers-list\u003e\n\u003cscript\u003e\n{\n  editor.headers = 'content-type: x-test\\nLink: \u003chttps://api.github.com/organizations/19393150/repos?page=6\u003e, rel=\"next\";';\n}\n\u003c/script\u003e\n```\n\n## Development\n\n```sh\ngit clone https://github.com/advanced-rest-client/arc-headers\ncd arc-headers\nnpm install\n```\n\n### Running the demo locally\n\n```sh\nnpm start\n```\n\n### Running the tests\n\n```sh\nnpm test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farc-archive%2Farc-headers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farc-archive%2Farc-headers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farc-archive%2Farc-headers/lists"}