Class SerializationHelper
java.lang.Object
com.eqixiac.equinix.core.http.SerializationHelper
Attaches JSON request bodies: the payload is carried on the request as a
RequestBody and serialized to the wire by
RequestFactory at dispatch time (once per
attempt), honoring the request's content type and any Jackson
FilterProvider. Because serialization is deferred,
a payload mutated after attachment (e.g. a POST-search body whose pagination offset the paging
pipeline advances) is re-serialized automatically on the next dispatch.
Split out of the former monolithic Utils class; see RequestAssembler,
ResponseHandler and ParameterMapper for the other request/response helpers.
- Author:
- ianjones
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidserializeJson(EquinixRequest<T> equinixRequest, Object objectToSerialize) AttachesobjectToSerializeas the request's JSON body.
-
Constructor Details
-
SerializationHelper
public SerializationHelper()
-
-
Method Details
-
serializeJson
AttachesobjectToSerializeas the request's JSON body.- Parameters:
equinixRequest- the request to carry the bodyobjectToSerialize- the payload to serialize at dispatch time (nevernull)
-