public final class ReflectiveHttpConfigBasedRequester extends Object
As the this lives in mule and it cannot depend on the HTTP extension, reflection is used to access the returned headers.
Constructor and Description |
---|
ReflectiveHttpConfigBasedRequester(String configName,
ExtensionsClient client) |
Modifier and Type | Method and Description |
---|---|
Pair<InputStream,Map<String,String>> |
get(String url,
Map<String,String> headers)
Performs a GET request to the URL passed as parameter with a set of headers.
|
Pair<InputStream,Map<String,String>> |
post(String url,
Map<String,String> headers,
InputStream body)
Performs a PORT request to the URL passed as parameter with a set of headers and a body content.
|
public ReflectiveHttpConfigBasedRequester(String configName, ExtensionsClient client)
public Pair<InputStream,Map<String,String>> get(String url, Map<String,String> headers)
url
- the URL to be requestedheaders
- a set of headers that are going to be bounded to the requestPair
in which the first element is the response and the second is a set of response headers.public Pair<InputStream,Map<String,String>> post(String url, Map<String,String> headers, InputStream body)
url
- the URL to be requestedheaders
- a set of headers that are going to be bounded to the requestbody
- the content body bounded to the request.Pair
in which the first element is the response and the second is a set of response headers.Copyright © 2018. All rights reserved.