@@ -93,9 +93,11 @@ private void setRequestHeaderOfAccept(Map<String, String> headers, RequestBody b
9393 accepts .add (userAcceptValue );
9494 }
9595 // 2. set accept header same with content-type
96- final String contentType = body .contentType ().toString ();
97- if (contentType != null && contentType .length () > 0 ) {
98- accepts .add (contentType );
96+ if (body .contentType () != null ) {
97+ final String contentType = Objects .requireNonNull (body .contentType ()).toString ();
98+ if (contentType .length () > 0 ) {
99+ accepts .add (contentType );
100+ }
99101 }
100102 // 3. add */* at last
101103 accepts .add (ACCEPT_ALL );
@@ -199,6 +201,10 @@ private <T> CompletableFuture<HttpResponse<T>> doAsyncInvoke(String method,
199201
200202 if (HttpExtension .GET .getMethod ().toString ().equals (httpMethod )) {
201203 // TODO: 2021/11/30 append urlParameters to url
204+ if (logger .isWarnEnabled ()) {
205+ logger .warn ("[Capa.Rpc.Client.http] [AwsCapaHttp.doAsyncInvoke] GET not supported now, urlParameters[{}]" ,
206+ urlParameters );
207+ }
202208 }
203209
204210 // async invoke
@@ -210,7 +216,7 @@ private <T> CompletableFuture<HttpResponse<T>> doAsyncInvoke(String method,
210216 type );
211217 asyncInvoke0 .exceptionally (throwable -> {
212218 if (logger .isWarnEnabled ()) {
213- logger .warn ("[AwsCapaHttp] async invoke error" , throwable );
219+ logger .warn ("[Capa.Rpc.Client.http] [ AwsCapaHttp.doAsyncInvoke ] async invoke error" , throwable );
214220 }
215221 throw new CapaException (CapaErrorContext .DEPENDENT_SERVICE_ERROR , throwable );
216222 });
@@ -229,6 +235,11 @@ private <T> CompletableFuture<HttpResponse<T>> invokeHttp(String url,
229235
230236 Headers header = getRequestHeaderWithParams (headers );
231237
238+ if (logger .isDebugEnabled ()) {
239+ logger .debug ("[Capa.Rpc.Client.http] [AwsCapaHttp.invokeHttp] final request url[{}] header[{}] httpMethod[{}]" ,
240+ url , header , httpMethod );
241+ }
242+
232243 // make http request
233244 Request request = new Request .Builder ()
234245 .url (url )
0 commit comments