Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Caught in the Middle! A story of HTTPModule and Interceptors

Caught in the Middle! A story of HTTPModule and Interceptors

A presentation highlighting the benefits of migrating applications to leverage the power of HTTPClient Module over HTTP Api and HTTP Module for legacy enterprise scale applications.

Additionally, it is connected to a repo you can download, to play with GraphQL, ApolloClient, Lazy Loading in Angular, Authentication Guards and HTTP Interceptors.

GraphQL/Express Server: https://github.com/anfibiacreativa/myapp-server
Apollo Client: https://github.com/anfibiacreativa/myapp-apollo-interceptors

Natalia Venditto

May 27, 2019
Tweet

More Decks by Natalia Venditto

Other Decks in Technology

Transcript

  1. Photo by Annie Spratt on Unsplash Photo by Hello I'm

    Nik on Unsplash Build us a very large app! It connects to Many apis!
  2. Content Policies: Structure v2.0.0 v2.1.2 v2.2.4 v2.3.1 v2.4.3 v4.0.0 v5.2.2

    https://github.com/angular/angular/blob /master/CHANGELOG.md
  3. Hello? Can I have some data, pls? The typical HTTP

    over TCP/IP request/response thingy.
  4. Let me see,... We have some options... The typical HTTP

    over TCP/IP request/response thingy.
  5. I can allow for that only if you give me

    the headsup The typical HTTP over TCP/IP request/response thingy.
  6. What about a… Errm, some csrf token, a few cookies

    Aaaand, this credentials The typical HTTP over TCP/IP request/response thingy.
  7. TOKENS HTTPClient Module perks ... ▪ Typed req/res ▪ Observable

    based API’s ▪ Streamlined error handling ▪ Event progress ▪ Req/Res Interceptors
  8. TOKENS Types of tokens ▪ XSRF (CSRF) Token ▪ Session

    validation token ▪ XYZ API Key… etc.
  9. TOKENS Usually these tokens... ▪ Expire after each use in

    an idempotent request ▪ Must travel back and forth with each request
  10. Thank you! @anfibiacreativa All images are from unsplash.com Including all

    cats (By several authors) https://unsplash.com/search/photos/kitten Gifs by Tenor https://tenor.com Learn more at https://github.com/anfibiacreativa/myapp-apollo-interceptors