Comments (4)
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.
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.
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.
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)
- `HasReponse` only works on single item HOT 1
- Undefined class 'HeaderAuthenticator' HOT 4
- Typing of responses with DTO's HOT 3
- Body-based Pagination HOT 1
- Paginator Next Request URL help HOT 5
- Create commands not respecting config file HOT 4
- Dots in parameters get converted to underscores because of parse_str HOT 7
- Refresh token with Client Credentials Grant HOT 5
- Faking a response - failed to match url HOT 2
- Cannot Have Request with `headers` HOT 4
- Skipping authentication when request is cached HOT 7
- Skipping AuthenticatePendingRequest when fetching a new accessToken using OAuth2 plugins HOT 4
- OAuth2 - Method not allowed (405) when getting the access Token HOT 8
- Missing methods updates for MockResponse HOT 1
- ERROR There are no commands defined in the "saloon" namespace. HOT 1
- Rate Limit Plugin: Issue with 'allow(1)->everySeconds(1)->sleep()' Exceeding One Request per Second
- Inteliphense cannot recognize the merge() method on request HOT 3
- Connector default headers overwrite request body headers HOT 1
- Remove authentication on a specific request HOT 5
- Some properties are removed from the response body
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from saloon.