GithubHelp home page GithubHelp logo

Comments (4)

Sammyjo20 avatar Sammyjo20 commented on August 17, 2024

Hey!

Thanks for your message, have you tried applying the following Guzzle option to your request config array?

'allow_redirects' => true,

https://docs.guzzlephp.org/en/stable/request-options.html

from saloon.

guiiamorim avatar guiiamorim commented on August 17, 2024

I did, and the results are the same.
The allow_redirects option is enabled by default btw, you can see it in the second test I posted, which doesn't have any configuration and still works.

One thing that I didn't metioned before is that the route login/auth should never be returned. If I pass a invalid API key (or none) it gives me a 400 response, not a login page (which is happening in the first test).

Also, if you wish to reproduce the error, this is my custom authenticator, I forgot to post yesterday:

class Authenticator implements AuthenticatorInterface
{
    public function __construct(
        public string $apiKey,
    ) {
    }

    public function set(SaloonRequest $request): void
    {
        $request->addHeader('access_token', $this->apiKey);
    }
}

from saloon.

guiiamorim avatar guiiamorim commented on August 17, 2024

I'm really embarassed, I've just spent TWO hole days trying to figure this out, but in the end I was sending the requests to the wrong endpoint. The baseUrl should contain the path /api/v3/, which is present on the Guzzle test, but isn't in my connector. I'm sorry for wasting your time (and mine kkkkkk) and thank you so much for the trying to help me.

from saloon.

Sammyjo20 avatar Sammyjo20 commented on August 17, 2024

Ohhh no! I hate those scenarios! Glad you sorted it and apologies I would have spent more time looking into it over the weekend. Glad it’s working okay πŸ˜€

from saloon.

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.