HttpConnectionParams.setSoTimeout(params, milliseconds);
}
private void upload(Method method, List<String> resources, Map<String, Object> options, HttpEntity entity) throws ResourceException
{
HttpEntityEnclosingRequestBase request;
if(method == Method.PUT)
{
request = new HttpPut(url(resources, options));
}
else if(method == Method.POST)
{
request = new HttpPost(url(resources, options));
}
else
{
throw new IllegalArgumentException();
}
addAuthenticationHeader(request);
request.setEntity(entity);
try
{
HttpResponse response = client.execute(request);
checkResponseCode(Method.PUT, resources, options, response);