Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1C076183AF for ; Sun, 13 Dec 2015 20:49:47 +0000 (UTC) Received: (qmail 8515 invoked by uid 500); 13 Dec 2015 20:49:46 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 8467 invoked by uid 500); 13 Dec 2015 20:49:46 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 8452 invoked by uid 99); 13 Dec 2015 20:49:46 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Dec 2015 20:49:46 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B0E802C1F6B for ; Sun, 13 Dec 2015 20:49:46 +0000 (UTC) Date: Sun, 13 Dec 2015 20:49:46 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HTTPCLIENT-1703) GET request should support body MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Kalnichevski updated HTTPCLIENT-1703: ------------------------------------------ Fix Version/s: 5.0 > GET request should support body > ------------------------------- > > Key: HTTPCLIENT-1703 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1703 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: Fluent HC > Affects Versions: 4.5.1 > Reporter: Konstantin Ignatyev > Fix For: 5.0 > > > I have discovered that fluent client does not allow BODY for a get request > java.lang.IllegalStateException: GET request cannot enclose an entity > at org.apache.http.client.fluent.Request.body(Request.java:348) > at org.apache.http.client.fluent.Request.bodyString(Request.java:375) > at kgi.mcytravel.wsite.services.FullTextSearchService.fullTextSearch(FullTextSearchService.scala:72) > Which is not correct, spec does not prohibit GET request from having a body. It seems a bit unconventional but makes perfect sense considering complex search requests use case. And it is utilized by ElasticSearch for example > https://www.elastic.co/guide/en/elasticsearch/reference/current/search.html > curl -XGET 'http://localhost:9200/twitter/tweet/_search?routing=kimchy' -d '{ > "query": { > "bool" : { > "must" : { > "query_string" : { > "query" : "some query string here" > } > }, > "filter" : { > "term" : { "user" : "kimchy" } > } > } > } > } > ' -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org