Dmitry Belaventsev
Dmitry Belaventsev

Reputation: 6657

How to get remote ip from `twisted.web._newclient.Response` instance

I have a code, which make request to web-site (request by hostname, for example - www.google.com). Remote host send a response. How can I get IP of the host, which sent a response?

PS

I'm using twisted web client

PS2

Feature request

Upvotes: 1

Views: 264

Answers (1)

Jean-Paul Calderone
Jean-Paul Calderone

Reputation: 48335

At present, there is no way. Agent itself doesn't expose this information, nor an API for discovering this information. Neither does the IResponse provider which you get back from the Deferred returned by Agent.request.

This sounds like a good feature request to file at http://twistedmatrix.com/trac :)

Upvotes: 2

Related Questions