Giter Club home page Giter Club logo

mtz-ajax-interceptor's Introduction

Build Status Published on webcomponents.org

<mtz-ajax-interceptor>

A group of elements to support intercepting ajax requests for injecting headers, url rewriting or handling responses globally.

Elements

<mtz-ajax-interceptor>

An implementation of mtz-ajax-interceptor-behavior useful for quick implementations, ie. demos. This allows other interceptors to be slotted in.

<mtz-auth-interceptor>

An implementation of the mtz.InterceptorBehavior that injects auth headers based on the event.target containing the [with-auth] attribute.

<mtz-auth-interceptor>

An implementation of the mtz.InterceptorBehavior that globally sets the withCredentials option based on the local withCredentials property.

<mtz-presend-header-interceptor>

An implementation of the mtz.InterceptorBehavior that injects a header:value onto a presend event for iron-ajax.

<mtz-status-code-interceptor>

An 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.

<mtz-url-rewrite-interceptor>

An implementation of the mtz.InterceptorBehavior that rewrites matching requests request url to a new url onto a presend event for iron-ajax.

Behaviors

mtz.AjaxInterceptor

Handles registering declarative interceptors then listening for all registered events and calling the interceptors associated with those events.

mtz.Interceptor

Used 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.

Install the Polymer-CLI

First, make sure you have the Polymer CLI installed. Then run polymer serve to serve your element locally.

Viewing Your Element

$ polymer serve

Running Tests

$ polymer test

Your application is already set up to be tested via web-component-tester. Run polymer test to run your application's test suite locally.

mtz-ajax-interceptor's People

Contributors

stramel avatar admwx7 avatar zemptime avatar laurkatz13 avatar jay8t6 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.