{"id":20164744,"url":"https://github.com/maritzstl/mtz-ajax-interceptor","last_synced_at":"2025-03-03T03:14:43.325Z","repository":{"id":98797899,"uuid":"95154426","full_name":"MaritzSTL/mtz-ajax-interceptor","owner":"MaritzSTL","description":"A group of elements to support intercepting ajax requests for injecting headers or handling responses globally.","archived":false,"fork":false,"pushed_at":"2018-12-20T16:59:14.000Z","size":351,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-13T14:31:55.443Z","etag":null,"topics":["injecting-headers","interceptor","polymer","web-components"],"latest_commit_sha":null,"homepage":"https://www.webcomponents.org/element/MaritzSTL/mtz-ajax-interceptor","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaritzSTL.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-22T20:36:36.000Z","updated_at":"2023-10-04T15:59:01.000Z","dependencies_parsed_at":"2023-03-09T04:45:30.196Z","dependency_job_id":null,"html_url":"https://github.com/MaritzSTL/mtz-ajax-interceptor","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaritzSTL%2Fmtz-ajax-interceptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaritzSTL%2Fmtz-ajax-interceptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaritzSTL%2Fmtz-ajax-interceptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaritzSTL%2Fmtz-ajax-interceptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaritzSTL","download_url":"https://codeload.github.com/MaritzSTL/mtz-ajax-interceptor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241600490,"owners_count":19988715,"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":["injecting-headers","interceptor","polymer","web-components"],"created_at":"2024-11-14T00:35:36.871Z","updated_at":"2025-03-03T03:14:43.302Z","avatar_url":"https://github.com/MaritzSTL.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://img.shields.io/travis/MaritzSTL/mtz-ajax-interceptor/master.svg?style=flat-square)](https://travis-ci.org/MaritzSTL/mtz-ajax-interceptor)\n[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg?style=flat-square)](https://www.webcomponents.org/element/MaritzSTL/mtz-ajax-interceptor)\n\n# \\\u003cmtz-ajax-interceptor\\\u003e\n\nA group of elements to support intercepting ajax requests for injecting headers, url rewriting or handling responses globally.\n\n## Elements\n\n### `\u003cmtz-ajax-interceptor\u003e`\nAn implementation of `mtz-ajax-interceptor-behavior` useful for quick implementations, ie. demos. This allows other interceptors to be slotted in.\n\n### `\u003cmtz-auth-interceptor\u003e`\nAn implementation of the mtz.InterceptorBehavior that injects auth headers based on the event.target containing the [with-auth] attribute. \n\n### `\u003cmtz-cookie-interceptor\u003e` [Deprecated use `\u003cmtz-auth-interceptor\u003e`]\nAn implementation of the mtz.InterceptorBehavior that globally sets the withCredentials option based on the local `withCredentials` property.\n\n### `\u003cmtz-presend-header-interceptor\u003e`\nAn implementation of the mtz.InterceptorBehavior that injects a header:value onto a presend event for iron-ajax.\n\n### `\u003cmtz-status-code-interceptor\u003e`\nAn implementation of the mtz.InterceptorBehavior that compares a status property against the status code in the event to determine if the interceptor logic should run or not.\n\n### `\u003cmtz-url-rewrite-interceptor\u003e`\nAn implementation of the mtz.InterceptorBehavior that rewrites matching requests request url to a new url onto a presend event for iron-ajax.\n\n## Behaviors\n\n### `mtz.AjaxInterceptor`\nHandles registering declarative interceptors then listening for all registered events and calling the interceptors associated with those events.\n\n### `mtz.Interceptor`\nUsed to create an instance of an interceptor that allows for declarative registration for binding logic to a bubbling event that is not a child of the element.\n\n\n## Install the Polymer-CLI\n\nFirst, make sure you have the [Polymer CLI](https://www.npmjs.com/package/polymer-cli) installed. Then run `polymer serve` to serve your element locally.\n\n## Viewing Your Element\n\n```\n$ polymer serve\n```\n\n## Running Tests\n\n```\n$ polymer test\n```\n\nYour application is already set up to be tested via [web-component-tester](https://github.com/Polymer/web-component-tester). Run `polymer test` to run your application's test suite locally.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaritzstl%2Fmtz-ajax-interceptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaritzstl%2Fmtz-ajax-interceptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaritzstl%2Fmtz-ajax-interceptor/lists"}