public abstract class ContentMatcher extends Object
HttpRequestImpl treats content as a byte array by default. However in the case JSON / XML you can have a non equal
byte array which still gives you the same representation: for example different order of properties in json..
To be able to have custom equals/hashcode logic you can set your own ContentMatcher when building a
HttpRequestImpl.HttpRequestImpl| Constructor and Description |
|---|
ContentMatcher() |
| Modifier and Type | Method and Description |
|---|---|
abstract ContentMatcher |
copy()
Create a copy of this ContentProxy.
|
abstract boolean |
equals(Object obj) |
abstract byte[] |
getContent()
Gets content.
|
abstract int |
hashCode() |
abstract void |
setContent(byte[] content)
Sets content.
|
public abstract byte[] getContent()
public abstract void setContent(byte[] content)
throws UnexpectedContentException
content - Content.UnexpectedContentException - In case we don't expect given content. This matcher is incompatible with given
content.public abstract ContentMatcher copy()
Copyright © 2014. All Rights Reserved.