saghul/aiodns

Requested hostname in response?

blark opened this issue · 3 comments

blark commented

Is it possible to get the requested hostname included in the response (error or success)?

When requesting lots of domain names at one time it becomes cumbersome to try and include this data in some other way. It would be great if it was just accessible in the returned object.

If I'm missing something please let me know, but right now I only see the TTL and IP address.

blark commented

Actually, I just realized I could pass the info as a parameter to my callback using the following syntax:

task.add_done_callback(functools.partial(<FUNCTION_NAME>, <PARAMETER>))

Which works fine, but there may still be a case for including the request domain in the object for convenience sake?

Sorry this fell through the cracks. I'd rather keep the API as minimal as possible, so the partial the way to go :-)

blark commented

Thanks for the response!