use of com.opentext.ia.sdk.support.http.Part in project infoarchive-sip-sdk by Enterprise-Content-Management.
the class ApacheHttpClient method post.
@Override
public <T> T post(String uri, Collection<Header> headers, Class<T> type, Part... parts) throws IOException {
HttpPost request = newPost(uri, headers);
MultipartEntityBuilder entityBuilder = MultipartEntityBuilder.create();
for (Part part : parts) {
entityBuilder.addPart(part.getName(), newContentBody(part));
}
request.setEntity(entityBuilder.build());
return execute(request, type);
}
use of com.opentext.ia.sdk.support.http.Part in project infoarchive-sip-sdk by Enterprise-Content-Management.
the class ApacheHttpClient method put.
@Override
public <T> T put(String uri, Collection<Header> headers, Class<T> type, Part... parts) throws IOException {
HttpPut request = newPut(uri, headers);
MultipartEntityBuilder entityBuilder = MultipartEntityBuilder.create();
for (Part part : parts) {
entityBuilder.addPart(part.getName(), newContentBody(part));
}
request.setEntity(entityBuilder.build());
return execute(request, type);
}
Aggregations