File tree Expand file tree Collapse file tree 3 files changed +46
-3
lines changed
src/main/java/com/arangodb/internal Expand file tree Collapse file tree 3 files changed +46
-3
lines changed Original file line number Diff line number Diff line change 4040import org .apache .http .client .ClientProtocolException ;
4141import org .apache .http .client .config .RequestConfig ;
4242import org .apache .http .client .methods .CloseableHttpResponse ;
43- import org .apache .http .client .methods .HttpDelete ;
4443import org .apache .http .client .methods .HttpEntityEnclosingRequestBase ;
4544import org .apache .http .client .methods .HttpGet ;
4645import org .apache .http .client .methods .HttpHead ;
@@ -256,7 +255,7 @@ private static HttpRequestBase buildHttpRequestBase(
256255 final HttpRequestBase httpRequest ;
257256 switch (request .getRequestType ()) {
258257 case DELETE :
259- httpRequest = new HttpDelete (url );
258+ httpRequest = requestWithBody ( new HttpDeleteWithBody (url ), request );
260259 break ;
261260 case GET :
262261 httpRequest = new HttpGet (url );
Original file line number Diff line number Diff line change 1+ /*
2+ * DISCLAIMER
3+ *
4+ * Copyright 2016 ArangoDB GmbH, Cologne, Germany
5+ *
6+ * Licensed under the Apache License, Version 2.0 (the "License");
7+ * you may not use this file except in compliance with the License.
8+ * You may obtain a copy of the License at
9+ *
10+ * http://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing, software
13+ * distributed under the License is distributed on an "AS IS" BASIS,
14+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ * See the License for the specific language governing permissions and
16+ * limitations under the License.
17+ *
18+ * Copyright holder is ArangoDB GmbH, Cologne, Germany
19+ */
20+
21+ package com .arangodb .internal .http ;
22+
23+ import java .net .URI ;
24+
25+ import org .apache .http .client .methods .HttpEntityEnclosingRequestBase ;
26+
27+ /**
28+ * @author Mark - mark at arangodb.com
29+ *
30+ */
31+ public class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
32+ public final static String METHOD_NAME = "DELETE" ;
33+
34+ public HttpDeleteWithBody (final String uri ) {
35+ super ();
36+ setURI (URI .create (uri ));
37+ }
38+
39+ @ Override
40+ public String getMethod () {
41+ return METHOD_NAME ;
42+ }
43+
44+ }
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public static void log(
4848 final ArangoSerialization util ) {
4949 final RequestType requestType = request .getRequestType ();
5050 final boolean includeBody = (requestType == RequestType .POST || requestType == RequestType .PUT
51- || requestType == RequestType .PATCH ) && request .getBody () != null ;
51+ || requestType == RequestType .PATCH || requestType == RequestType . DELETE ) && request .getBody () != null ;
5252 final StringBuilder buffer = new StringBuilder ();
5353 if (includeBody ) {
5454 buffer .append ("\n " );
You can’t perform that action at this time.
0 commit comments