Git Product home page Git Product logo

Comments (2)

airtonix avatar airtonix commented on June 23, 2024

The solution is to use the $http.post, $http.get, $http.put, $http.patch, $http.delete, shortcuts instead of $http({ method: "POST"}).

This way they use the common headers which you can update at anytime,

from angular-http-auth.

laurelnaiad avatar laurelnaiad commented on June 23, 2024

What, if anything, needs to happen such that buffered $http requests are retried with either the up-to-date default configuration, or with an override that is specific to the retries?

Right now it looks like the config is bundled in the retry buffer... would it be correct/useful to take what's in the retry buffer, merge the new $http defaults onto it, and then merge anything provided by the loginConfirmed function as an extra level of controlling those requests?

So, the default behavior would be:

  • take the buffered $http config for any request and apply the new (newly) current default $http config on top of that
  • using the buffered configs as the basis for the ultimately applicable config when these retries occur only impacts the bufferred requests... everything else proceeds with $http defaults, whatever they may be when subsequent requests are made
  • if, during the course of confirming the login, any changes should be applied to the bufferred requests, and such changes should not impact the longer-term behavior of $http, then the client specifies a config object when confirning the login to the service, such that it will override the config that would otherwise be used.

I think I should have written code to express that...

Basically, make sure that by default http-auth takes the combination of the fresh default $http config when it retries.

And for bonus points, let someone specify additional overrides to the defaults for purposes of only the retries.

from angular-http-auth.

Related Issues (20)

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.