Search in sources :

Example 1 with BodyContent

use of com.blackducksoftware.integration.hub.request.BodyContent in project hub-alert by blackducksoftware.

the class ChannelRequestHelper method createPostMessageRequest.

public Request createPostMessageRequest(final String url, final Map<String, String> headers, final Map<String, String> queryParameters, final String jsonString) {
    Request.Builder requestBuilder = new Request.Builder();
    final BodyContent bodyContent = new BodyContent(jsonString);
    requestBuilder = requestBuilder.method(HttpMethod.POST).uri(url).additionalHeaders(headers).queryParameters(queryParameters).bodyContent(bodyContent);
    final Request request = requestBuilder.build();
    return request;
}
Also used : BodyContent(com.blackducksoftware.integration.hub.request.BodyContent) Request(com.blackducksoftware.integration.hub.request.Request)

Aggregations

BodyContent (com.blackducksoftware.integration.hub.request.BodyContent)1 Request (com.blackducksoftware.integration.hub.request.Request)1