1 package ch
.cyberduck
.core
.dav
;
4 * Copyright (c) 2013 David Kocher. All rights reserved.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * Bug fixes, suggestions and comments should be sent to:
18 * feedback@cyberduck.ch
21 import org
.apache
.http
.HttpResponse
;
22 import org
.apache
.http
.client
.ResponseHandler
;
23 import org
.apache
.http
.client
.methods
.HttpRequestBase
;
24 import org
.apache
.http
.impl
.client
.HttpClientBuilder
;
26 import java
.io
.IOException
;
29 import com
.github
.sardine
.impl
.SardineImpl
;
34 public class DAVClient
extends SardineImpl
{
38 public DAVClient(final String uri
, final HttpClientBuilder http
) {
44 public <T
> T
execute(final HttpRequestBase request
, final ResponseHandler
<T
> responseHandler
) throws IOException
{
45 request
.setURI(URI
.create(uri
+ request
.getURI().getRawPath()));
46 return super.execute(request
, responseHandler
);
50 protected HttpResponse
execute(final HttpRequestBase request
) throws IOException
{
51 request
.setURI(URI
.create(uri
+ request
.getURI().getRawPath()));
52 return super.execute(request
);