public class UrlIO extends Object implements CanEvaluate
Constructor and Description |
---|
UrlIO(XBProjector projector,
String url)
Constructor with defaults for request parameters.
|
Modifier and Type | Method and Description |
---|---|
UrlIO |
addRequestProperties(Map<String,String> params)
Allows to add some request properties.
|
UrlIO |
addRequestProperty(String name,
String value)
Allows to add a single request property.
|
XPathEvaluator |
evalXPath(String xpath)
Evaluate XPath on the url document.
|
<T> T |
read(Class<T> projectionInterface)
Create a new projection using a given URL parameter.
|
<T> XBAutoMap<T> |
readAsMapOf(Class<T> valueType)
Read complete document to a Map.
|
String |
write(Object projection)
Post the projected document to a HTTP URL.
|
public UrlIO(XBProjector projector, String url)
projector
- url
- public <T> T read(Class<T> projectionInterface) throws IOException
projectionInterface
- A Java interface to project the data on.IOException
public String write(Object projection) throws IOException
projection
- IOException
public UrlIO addRequestProperties(Map<String,String> params)
params
- public UrlIO addRequestProperty(String name, String value)
name
- value
- public XPathEvaluator evalXPath(String xpath)
evalXPath
in interface CanEvaluate
xpath
- CanEvaluate.evalXPath(java.lang.String)
public <T> XBAutoMap<T> readAsMapOf(Class<T> valueType) throws IOException
valueType
- IOException
Copyright © 2012-12-21-2022. All Rights Reserved.