Closed elazar closed 9 years ago
In case you were curious, the adapter is otherwise working fine. I don't know why I didn't see its output in Wireshark, but it is sending a request. The problem is that the lack of events firing prevents the Oauth plugin from working, and because the request isn't signed properly, I'm getting a 400 response from Twitter.
Makes sense and thanks for pointing this out to me! After I've finished #4 I'll get working on this. Might need to run oauth and such in a child process preventing it from blocking the I/o but I'll make sure it works flawless out of the box.
@elazar Can you confirm if it's fixed now for you?
@WyriHaximus Just a note, I'm currently blocked from testing this by WyriHaximus/PhergieDns#4.
Possibly related to reactphp/socket-client#11?
This appears to be working. I've got the Twitter plugin able to communicate with the Twitter API. Thanks!
Awesome :+1:
\WyriHaximus\React\Guzzle\HttpClientAdapter
implements\GuzzleHttp\Adapter\AdapterInterface
. However, itssend()
method implementation has an incompatibility with that ofAdapterInterface
: it includes an$options
parameter thatAdapterInterface
does not.Request methods in
\GuzzleHttp\Client
, such asget()
, call itscreateRequest()
method, which handles creating a request object that includes the options passed in the call to the request method (i.e.get()
).send()
is then called and passed that request object, which leaves it to the adapter to handle request options and events. You can see an example of this in thesend()
implementation of\GuzzleHttp\Adapter\Curl\CurlAdapter
, which callsRequestEvents::emitBefore()
and other similar methods that trigger events, in particular those listened for by plugins such as the Oauth plugin. Lack of equivalent calls in thesend()
method of\WyriHaximus\React\Guzzle\HttpClientAdapter
currently prevents plugins from working when it's used.