public interface HttpClientForm
Modifier and Type | Method and Description |
---|---|
HttpClientForm |
attr(java.lang.String name,
java.lang.String value)
Add an HTTP Form attribute
|
HttpClientForm |
charset(java.nio.charset.Charset charset)
Set the Form
Charset |
HttpClientForm |
cleanOnTerminate(boolean clean)
Should file attributes be cleaned and eventually removed from disk.
|
HttpClientForm |
encoding(io.netty.handler.codec.http.multipart.HttpPostRequestEncoder.EncoderMode mode)
Set Form encoding
|
HttpClientForm |
factory(io.netty.handler.codec.http.multipart.HttpDataFactory factory)
Set Upload factories (allows memory threshold configuration)
|
HttpClientForm |
file(java.lang.String name,
java.io.File file)
Add an HTTP File Upload attribute
|
default HttpClientForm |
file(java.lang.String name,
java.io.File file,
java.lang.String contentType)
Add an HTTP File Upload attribute
|
HttpClientForm |
file(java.lang.String name,
java.io.InputStream stream)
Add an HTTP File Upload attribute
|
default HttpClientForm |
file(java.lang.String name,
java.io.InputStream stream,
java.lang.String contentType)
Add an HTTP File Upload attribute
|
HttpClientForm |
file(java.lang.String name,
java.lang.String filename,
java.io.File file,
java.lang.String contentType)
Add an HTTP File Upload attribute
|
HttpClientForm |
file(java.lang.String name,
java.lang.String filename,
java.io.InputStream stream,
java.lang.String contentType)
Add an HTTP File Upload attribute
|
HttpClientForm |
files(java.lang.String name,
java.io.File[] files,
java.lang.String[] contentTypes)
Add an HTTP File Upload attribute
|
HttpClientForm |
files(java.lang.String name,
java.io.File[] files,
java.lang.String[] contentTypes,
boolean[] textFiles)
Add an HTTP File Upload attribute
|
HttpClientForm |
multipart(boolean multipart)
Define if this request will be encoded as Multipart
|
HttpClientForm |
textFile(java.lang.String name,
java.io.File file)
Add an HTTP File Upload attribute for a text file.
|
HttpClientForm |
textFile(java.lang.String name,
java.io.File file,
java.lang.String contentType)
Add an HTTP File Upload attribute for a text file.
|
HttpClientForm |
textFile(java.lang.String name,
java.io.InputStream stream)
Add an HTTP File Upload attribute for a text file.
|
HttpClientForm |
textFile(java.lang.String name,
java.io.InputStream inputStream,
java.lang.String contentType)
Add an HTTP File Upload attribute for a text file.
|
HttpClientForm attr(java.lang.String name, java.lang.String value)
name
- Attribute namevalue
- Attribute valueHttpClientForm charset(java.nio.charset.Charset charset)
Charset
charset
- form charsetHttpClientForm cleanOnTerminate(boolean clean)
clean
- true if cleaned on termination (successful or failed)HttpClientForm encoding(io.netty.handler.codec.http.multipart.HttpPostRequestEncoder.EncoderMode mode)
mode
- the encoding mode for this form encodingHttpClientForm factory(io.netty.handler.codec.http.multipart.HttpDataFactory factory)
factory
- the new HttpDataFactory
to useHttpClientForm file(java.lang.String name, java.io.File file)
name
- File namefile
- File referenceHttpClientForm file(java.lang.String name, java.io.InputStream stream)
name
- File namestream
- File content as InputStreamdefault HttpClientForm file(java.lang.String name, java.io.File file, @Nullable java.lang.String contentType)
name
- File namefile
- File referencecontentType
- File mime-typeHttpClientForm file(java.lang.String name, java.lang.String filename, java.io.File file, @Nullable java.lang.String contentType)
name
- File namefilename
- File name to override origin namefile
- File referencecontentType
- File mime-typedefault HttpClientForm file(java.lang.String name, java.io.InputStream stream, @Nullable java.lang.String contentType)
name
- File namestream
- File content as InputStreamcontentType
- File mime-typeHttpClientForm file(java.lang.String name, java.lang.String filename, java.io.InputStream stream, @Nullable java.lang.String contentType)
name
- File namefilename
- File name to override origin namestream
- File content as InputStreamcontentType
- File mime-typeHttpClientForm files(java.lang.String name, java.io.File[] files, java.lang.String[] contentTypes)
name
- File namefiles
- File referencescontentTypes
- File mime-types in the same order than file referencesHttpClientForm files(java.lang.String name, java.io.File[] files, java.lang.String[] contentTypes, boolean[] textFiles)
name
- File namefiles
- File referencescontentTypes
- File mime-type in the same order than file referencestextFiles
- Plain-Text transmission in the same order than file referencesHttpClientForm multipart(boolean multipart)
multipart
- should this form be encoded as MultipartHttpClientForm textFile(java.lang.String name, java.io.File file)
name
- Text file namefile
- Text File referenceHttpClientForm textFile(java.lang.String name, java.io.InputStream stream)
name
- Text file namestream
- Text file content as InputStreamHttpClientForm textFile(java.lang.String name, java.io.File file, @Nullable java.lang.String contentType)
name
- Text file namefile
- Text File referencecontentType
- Text file mime-typeHttpClientForm textFile(java.lang.String name, java.io.InputStream inputStream, @Nullable java.lang.String contentType)
name
- Text file nameinputStream
- Text file content as InputStreamcontentType
- Text file mime-type