[Python] Is there a way to extract the http response using python polling function

Discussão em 'Python' iniciado por Stack, Março 18, 2025.

  1. Stack

    Stack Membro Participativo

    I was using following code to poll a pub/sub server

    import requests
    polling2.poll(lambda: requests.get('http://google.com').status_code == 200,
    step=60,
    poll_forever=True)


    If this returns true,is there a way to access the response body in order to get the specific fields?In my case it is returning a json response

    Continue reading...

Compartilhe esta Página