On 23/07/2011, at 1:56 AM, Tanaka Akira wrote:
> I guess HTTP POST is not trivial to make an API which is polymorphic  
> to IO.

In general, that's true.

> For example, the request data length is required for Content-Length  
> before
> sending the data.

You don't have to send Content-Length, but you can't Keep-Alive unless  
you
do (unless you chunk each piece of Content as you discover its length,  
which
is possible as long as the server is HTTP/1.1 not 1.0).

So yes, it's complicated. Sometimes wholesale replacement (and  
providing a
fallback option) is a better strategy than stepwise refinement.

Clifford Heath.