Class HttpUploadClient
java.lang.Object
org.jboss.netty.example.http.upload.HttpUploadClient
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformget
(ClientBootstrap bootstrap, String host, int port, String get, URI uriSimple) Standard usage of HTTP API in Netty without file Upload (get is not able to achieve File upload due to limitation on request size).private static List
<InterfaceHttpData> formpost
(ClientBootstrap bootstrap, String host, int port, URI uriSimple, File file, HttpDataFactory factory, List<Map.Entry<String, String>> headers) Standard post without multipart but already support on Factory (memory management)private static void
formpostmultipart
(ClientBootstrap bootstrap, String host, int port, URI uriFile, HttpDataFactory factory, List<Map.Entry<String, String>> headers, List<InterfaceHttpData> bodylist) Multipart examplestatic void
-
Field Details
-
BASE_URL
-
FILE
-
textArea
- See Also:
-
textAreaLong
- See Also:
-
-
Constructor Details
-
HttpUploadClient
public HttpUploadClient()
-
-
Method Details
-
main
- Throws:
Exception
-
formget
private static List<Map.Entry<String,String>> formget(ClientBootstrap bootstrap, String host, int port, String get, URI uriSimple) throws Exception Standard usage of HTTP API in Netty without file Upload (get is not able to achieve File upload due to limitation on request size).- Returns:
- the list of headers that will be used in every example after
- Throws:
Exception
-
formpost
private static List<InterfaceHttpData> formpost(ClientBootstrap bootstrap, String host, int port, URI uriSimple, File file, HttpDataFactory factory, List<Map.Entry<String, String>> headers) throws ExceptionStandard post without multipart but already support on Factory (memory management)- Returns:
- the list of HttpData object (attribute and file) to be reused on next post
- Throws:
Exception
-
formpostmultipart
private static void formpostmultipart(ClientBootstrap bootstrap, String host, int port, URI uriFile, HttpDataFactory factory, List<Map.Entry<String, String>> headers, List<InterfaceHttpData> bodylist) throws ExceptionMultipart example- Throws:
Exception
-