com.ning.http.client
Interface BodyGenerator

All Known Implementing Classes:
ByteArrayBodyGenerator, FileBodyGenerator, InputStreamBodyGenerator

public interface BodyGenerator

Creates a request body.


Method Summary
 Body createBody()
          Creates a new instance of the request body to be read.
 

Method Detail

createBody

Body createBody()
                throws IOException
Creates a new instance of the request body to be read. While each invocation of this method is supposed to create a fresh instance of the body, the actual contents of all these body instances is the same. For example, the body needs to be resend after an authentication challenge of a redirect.

Returns:
The request body, never null.
Throws:
IOException - If the body could not be created.


Copyright © 2011. All Rights Reserved.