uk.co.autotrader.traverson.http.TextBody Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of traverson4j-core Show documentation
Show all versions of traverson4j-core Show documentation
The kernel of traverson4j. This provides the main API for a client to traverse a Hypermedia REST service
The newest version!
package uk.co.autotrader.traverson.http;
import java.nio.charset.Charset;
public class TextBody implements Body {
private final String data;
private final String contentType;
private final Charset charset;
public TextBody(String data, String contentType) {
this(data, contentType, null);
}
public TextBody(String data, String contentType, Charset charset) {
this.data = data;
this.contentType = contentType;
this.charset = charset;
}
@Override
public String getContent() {
return data;
}
@Override
public String getContentType() {
return contentType;
}
public Charset getCharset() {
return charset;
}
}