Search in sources :

Example 6 with HttpHeaderImpl

use of com.bluenimble.platform.http.impls.HttpHeaderImpl in project serverless by bluenimble.

the class BodyAwareRequest method setContentType.

private String setContentType() {
    String boundary = getBoundary();
    String ct = contentType;
    if (boundary != null) {
        ct = contentType + "; boundary=" + boundary;
    }
    List<HttpHeader> headers = getHeaders();
    if (headers == null) {
        headers = new ArrayList<HttpHeader>();
        setHeaders(headers);
    }
    headers.add(new HttpHeaderImpl(HttpHeaders.CONTENT_TYPE, ct));
    return boundary;
}
Also used : HttpHeader(com.bluenimble.platform.http.HttpHeader) HttpHeaderImpl(com.bluenimble.platform.http.impls.HttpHeaderImpl)

Aggregations

HttpHeader (com.bluenimble.platform.http.HttpHeader)6 HttpHeaderImpl (com.bluenimble.platform.http.impls.HttpHeaderImpl)6 HttpParameter (com.bluenimble.platform.http.HttpParameter)3 HttpParameterImpl (com.bluenimble.platform.http.impls.HttpParameterImpl)3 URI (java.net.URI)3 HttpEndpoint (com.bluenimble.platform.http.HttpEndpoint)2 HttpMessageBody (com.bluenimble.platform.http.HttpMessageBody)2 HttpRequestSignerException (com.bluenimble.platform.http.auth.HttpRequestSignerException)2 AccessSecretKeysBasedHttpRequestSigner (com.bluenimble.platform.http.auth.impls.AccessSecretKeysBasedHttpRequestSigner)2 HttpMessageBodyImpl (com.bluenimble.platform.http.impls.HttpMessageBodyImpl)2 StringHttpMessageBodyPart (com.bluenimble.platform.http.impls.StringHttpMessageBodyPart)2 JsonObject (com.bluenimble.platform.json.JsonObject)2 CommandExecutionException (com.bluenimble.platform.cli.command.CommandExecutionException)1 StreamPointer (com.bluenimble.platform.cli.command.parser.converters.StreamPointer)1 YamlObject (com.bluenimble.platform.cli.impls.YamlObject)1 HttpClientException (com.bluenimble.platform.http.HttpClientException)1 InputStreamHttpMessageBodyPart (com.bluenimble.platform.http.impls.InputStreamHttpMessageBodyPart)1 HttpRequest (com.bluenimble.platform.http.request.HttpRequest)1 HttpRequestWriteException (com.bluenimble.platform.http.request.HttpRequestWriteException)1 AbstractHttpRequest (com.bluenimble.platform.http.request.impls.AbstractHttpRequest)1