title: Yii2 HttpClient: Access Request instance from Response instance
body: <p>Using <a href="https://github.com/yiisoft/yii2-httpclient" rel="nofollow noreferrer"><code>yii2-httpclient</code></a>, what is the correct way to access the corresponding <a href="https://www.yiiframework.com/extension/yiisoft/yii2-httpclient/doc/api/2.0/yii-httpclient-request" rel="nofollow noreferrer"><code>yii\httpclient\Request</code></a> instance from the resulting <a href="https://www.yiiframework.com/extension/yiisoft/yii2-httpclient/doc/api/2.0/yii-httpclient-response" rel="nofollow noreferrer"><code>yii\httpclient\Response</code></a> object?</p>
  
  <p>I am trying to write a custom <a href="https://www.yiiframework.com/extension/yiisoft/yii2-httpclient/doc/api/2.0/yii-httpclient-xmlparser" rel="nofollow noreferrer">XML parser</a> which needs to know what URL it is parsing. It does not seem to be possible to access the original <code>Request</code> (through which I could <a href="https://www.yiiframework.com/extension/yiisoft/yii2-httpclient/doc/api/2.0/yii-httpclient-request#getUrl()-detail" rel="nofollow noreferrer">get the URL</a>) from a parser instance (only the <code>Response</code>).</p>
  
  <p>I have considered utilizing <code>yii\httpclient\Client::EVENT_AFTER_SEND</code> to copy the request into a variable, but that would not be thread-safe, so I need a better solution.</p>