I'm using the function dpkt.http.Request(), but sometimes the http flow is not a request.
Is there a quick way in python or dpkt to know if my request is GET or POST?
Try parsing it as a HTTP request and catch dpkt.UnpackError so your program doesn't die if it's not a HTTP request.
If no exception was thrown, you can use .method of the Request object to get the method that was used.
Best way to know if http request is GET or POST with DPKT?