public class BodyFactory
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BodyFactory.Type |
| Constructor and Description |
|---|
BodyFactory() |
| Modifier and Type | Method and Description |
|---|---|
static HttpRequestBody |
makeRequestBody(org.expath.tools.model.Element elem,
org.expath.tools.model.Sequence bodies,
java.lang.String ns) |
static HttpResponseBody |
makeResponseBody(Result result,
ContentType type,
HttpConnection conn) |
static BodyFactory.Type |
parseType(ContentType type)
Decode the content type from a ContentType object.
|
static BodyFactory.Type |
parseType(HeaderSet headers)
Look for the header Content-Type in a header set and decode it.
|
public static HttpRequestBody makeRequestBody(org.expath.tools.model.Element elem, org.expath.tools.model.Sequence bodies, java.lang.String ns) throws HttpClientException
HttpClientExceptionpublic static HttpResponseBody makeResponseBody(Result result, ContentType type, HttpConnection conn) throws HttpClientException
HttpClientExceptionpublic static BodyFactory.Type parseType(HeaderSet headers) throws HttpClientException
headers - the headers to parse the Content-Type fromHttpClientException - if the headers are nullpublic static BodyFactory.Type parseType(@Nullable ContentType type) throws HttpClientException
type - the content typeHttpClientException - if the headers are null, or the content type cannot be foundCopyright © 2015-2020 EXPath. All Rights Reserved