GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||
GeezerVison is showing github.com — Skip adding default content-type header 'application/x-www-form-urlencoded' if content is null · Issue #1083 · scribejava/scribejava Open DescriptionDear ScribeJava, Library: https://github.com/scribejava/scribejava/tree/master/scribejava-httpclient-apache While building the request object: Line 85 in 8970e8e
I would like to ask you add a condition while adding the default 'Content-Type' header while preparing the requests, to verify the entity and if it's null then skip adding default 'Content-Type' header private <T> Future<T> doExecuteAsync(String userAgent, Map<String, String> headers, Verb httpVerb, String completeUrl, HttpEntity entity, OAuthAsyncRequestCallback<T> callback, OAuthRequest.ResponseConverter<T> converter) { final RequestBuilder builder = getRequestBuilder(httpVerb); builder.setUri(completeUrl); if (entity != null && httpVerb.isPermitBody()) { if (!headers.containsKey(CONTENT_TYPE)) { builder.addHeader(CONTENT_TYPE, DEFAULT_CONTENT_TYPE); } builder.setEntity(entity); } just like the implementation of OkHttpClient lib: Line 140 in 8970e8e
I agree with your reasoning from #966, that you want to allow the possibilities. On the other hand, few servers are too strict that they don't accept other kinds of 'Content-Type' that they don't support. If you still want to keep the behavior same, I would like to understand the reasoning behind a different implementation for OkHttpClient. Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |