Add timeout support for HTTP POST requests.

@cassiomarques @wevtimoteo Done in  f95d8a9.