public interface HttpPartSerializer
The following default implementations are provided:
UonPartSerializer
- Parts encoded in UON notation.
SimpleUonPartSerializer
- Parts encoded in UON notation, but
strings are treated as plain-text and arrays/collections are serialized as comma-delimited lists.
SimplePartSerializer
- Parts encoded in plain text.
This class is used in the following locations:
FormData.serializer()
FormDataIfNE.serializer()
Query.serializer()
QueryIfNE.serializer()
Header.serializer()
HeaderIfNE.serializer()
Path.serializer()
RequestBean.serializer()
RestClientBuilder.partSerializer(Class)
Implementations must include either a public no-args constructor or a public constructor that takes in a single
PropertyStore
object.
Modifier and Type | Interface and Description |
---|---|
static interface |
HttpPartSerializer.Null
Represent "no" part part serializer.
|
Modifier and Type | Method and Description |
---|---|
String |
serialize(HttpPartType type,
Object value)
Converts the specified value to a string that can be used as an HTTP header value, query parameter value,
form-data parameter, or URI path variable.
|
String serialize(HttpPartType type, Object value)
Returned values should NOT be URL-encoded.
type
- The category of value being serialized.value
- The value being serialized.Copyright © 2018 Apache. All rights reserved.