Open yoe opened 1 year ago
I just rewrote a test to pass in $ua, which works, so I'm not sure how to help you 😞
It works, because the test doesn't actually test the problem described in this bug :)
It's true that the constructor correctly assigns the user agent to the object by the time the constructor exits.
However, it does not use the passed user agent to download the openapi definition that is also passed to it. This is because the definition is downloaded by the _url_to_class
call on line 41 of lib/OpenAPI/Client.pm, but the assignment of the attributes is only done on the next line.
Aah! Now I get it :) Thanks for explaining. Shouldn’t be too hard to fix…
I'm trying to connect to a Kubernetes API server. This requires me to do two things:
This is even true when trying to access the OpenAPI definition (at $apiserver/openapi/v2).
In order to do that, I prepared a Mojo::UserAgent like so:
However, OpenAPI::Client does not seem to use the Mojo::UserAgent at this point:
One can bypass that by setting MOJO_CA_FILE, but that misses the header: