Closed Ilyes512 closed 5 years ago
I am definitely interested in your findings!
@Ilyes512 Is it possible to apply the AddHostPlugin after Yang has finished the processing? That way - using the replace
option - the plugin could overwrite the host.
Or another solution could be to only set the host in the Request Builder when it is not empty. So instead of this:
$uri = $request
->getUri()
->withScheme($this->scheme)
->withHost($this->host)
->withPort($this->port);
we could conditionally set the values.
I am closing the ticket because of inactivity. If the problem becomes urgent, feel free to reopen it, and we can discuss how to proceed.
Thats ok :) Haven't been working on the project where I had this problem. I will probably be working on it in my next sprint. I will try and remember this.
Hey first off awesome library!!
I was already playing with php-http and so I was using AddHostPlugin.
However, the plugin is currently not useable in combination with yang because when you use the JsonApiRequestBuilder to create a request. It will set a (default) host in the request, which will have precedence over the client configured host.
I will see if I can extend JsonApiRequestBuilder and change the behaviour of getRequest() later.