public String getLocation() throws IOException { return getHeader(LOCATION); }
private HttpEntityEnclosingRequestBase getHttpEntityEnclosingRequestBase() { return (HttpEntityEnclosingRequestBase) getMethod(); }
public void setAccept(String accept) { setHeader(ACCEPT, accept); } }
public void addString(String name, String value) { getBuilder().addTextBody(name, value, TEXT_PLAIN_UTF8); }
protected HttpResponse execute() throws IOException { if (builder != null) { HttpEntity entity = builder.build(); getHttpEntityEnclosingRequestBase().setEntity(entity); } return super.execute(); }
public void addFile(String name, File value) { if (value.exists() && value.length() > 4096) containsFileLargerThan4k = true; getBuilder().addBinaryBody(name, value, APPLICATION_OCTET_STREAM, encodeUriButKeepSlashes(value.getName())); }
public void addFile(String name, byte[] value) { if (value.length > 4096) containsFileLargerThan4k = true; getBuilder().addBinaryBody(name, value, APPLICATION_OCTET_STREAM, encodeUriButKeepSlashes(name + ".xml")); }