public class MultipartEncodedDataProcessor extends Object implements FormDataProcessor
FormDataProcessor
.Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE |
Constructor and Description |
---|
MultipartEncodedDataProcessor() |
Modifier and Type | Method and Description |
---|---|
String |
getSupportetContentType()
Returns
FormDataProcessor implementation supporting Content-Type. |
protected boolean |
isFile(Object value)
Checks is passed object a supported file's type or not.
|
void |
process(Map<String,Object> data,
feign.RequestTemplate template)
Processing form data to request body.
|
protected void |
writeFile(OutputStream output,
PrintWriter writer,
String name,
Object value)
Writes file's content to output stream.
|
public static final String CONTENT_TYPE
public void process(Map<String,Object> data, feign.RequestTemplate template)
FormDataProcessor
process
in interface FormDataProcessor
data
- form data, where key is a parameter name and value is...a value.template
- current request object.public String getSupportetContentType()
FormDataProcessor
FormDataProcessor
implementation supporting Content-Type.getSupportetContentType
in interface FormDataProcessor
protected boolean isFile(Object value)
value
- form file parameter.protected void writeFile(OutputStream output, PrintWriter writer, String name, Object value)
output
- output stream to remote destination.writer
- wrapped output stream.name
- file's name.value
- file's content.Copyright © 2016 Pivotal Software, Inc.. All rights reserved.