public class HttpClientService extends Object
| Constructor and Description |
|---|
HttpClientService(org.mule.runtime.http.api.client.HttpClient httpClient)
Creates a new object that uses given client to communicate via HTTP/HTTPS protocol.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
sendPost(String uri,
String requestBody,
Map<String,String> headers,
Map<String,String> cookies)
Makes a http POST call to given uri with given data.
|
public HttpClientService(org.mule.runtime.http.api.client.HttpClient httpClient)
httpClient - - client for HTTP/HTTPS communicationpublic InputStream sendPost(String uri, String requestBody, Map<String,String> headers, Map<String,String> cookies) throws IOException, TimeoutException
uri - uri to make call torequestBody - body of the message to be sendheaders - headers to send with bodycookies - cookies to send with bodyIOException - if something goes wrongTimeoutException - if the request times outCopyright © 2025 MuleSoft, Inc.. All rights reserved.