I want to send it and forget it. The http rest service call I'm making takes a few seconds to respond. The goal is to avoid waiting those few seconds before more code can execute. I'd rather not use python threads I'll use twisted async calls if I must and ignore the response.
They get lost because the internet is a big place and sometimes packets get dropped or servers get overloaded.
Libraries in Python to make HTTP Request There are many libraries to make an HTTP request in Python, which are httplib, urllib, httplib2 , treq, etc., but requests are the simplest and most well-documented libraries among them all.
Yes you can, and the specification is clear about what you can do and how to do it: The action performed by the POST method might not result in a resource that can be identified by a URI.
The post() method sends a POST request to the specified url. The post() method is used when you want to send some data to the server.
You are going to have to implement that asynchronously as HTTP protocol states you have a request and a reply.
Another option would be to work directly with the socket, bypassing any pre-built module. This would allow you to violate protocol and write your own bit that ignores any responses, in essence dropping the connection after it has made the request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With