Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0CCC42004C8 for ; Mon, 9 May 2016 22:14:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0B4631609A8; Mon, 9 May 2016 20:14:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5421416099C for ; Mon, 9 May 2016 22:14:17 +0200 (CEST) Received: (qmail 77143 invoked by uid 500); 9 May 2016 20:14:16 -0000 Mailing-List: contact dev-help@quarks.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@quarks.incubator.apache.org Delivered-To: mailing list dev@quarks.incubator.apache.org Received: (qmail 77132 invoked by uid 99); 9 May 2016 20:14:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2016 20:14:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 2F2BB1A0437 for ; Mon, 9 May 2016 20:14:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.021 X-Spam-Level: X-Spam-Status: No, score=-4.021 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id muR-ZefKydqu for ; Mon, 9 May 2016 20:14:14 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id C9AB95F1E5 for ; Mon, 9 May 2016 20:14:13 +0000 (UTC) Received: (qmail 76628 invoked by uid 99); 9 May 2016 20:14:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 May 2016 20:14:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D9F572C033A for ; Mon, 9 May 2016 20:14:12 +0000 (UTC) Date: Mon, 9 May 2016 20:14:12 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@quarks.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (QUARKS-96) Add an HTTP POST utility method. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 09 May 2016 20:14:18 -0000 [ https://issues.apache.org/jira/browse/QUARKS-96?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276939#comment-15276939 ] ASF GitHub Bot commented on QUARKS-96: -------------------------------------- Github user dlaboss commented on a diff in the pull request: https://github.com/apache/incubator-quarks/pull/106#discussion_r62564599 --- Diff: connectors/http/src/main/java/quarks/connectors/http/runtime/HttpRequester.java --- @@ -69,16 +84,35 @@ public R apply(T t) { String m = method.apply(t); String uri = url.apply(t); HttpUriRequest request; + switch (m) { - case HttpGet.METHOD_NAME: + + case HttpGet.METHOD_NAME: request = new HttpGet(uri); break; - case HttpDelete.METHOD_NAME: + case HttpDelete.METHOD_NAME: request = new HttpDelete(uri); break; + case HttpPost.METHOD_NAME: + request = new HttpPost(uri); + break; + case HttpPut.METHOD_NAME: + request = new HttpPut(uri); --- End diff -- Adding Put seems like a good idea. Of course that then begs the question: should there also be {put,delete}Json()? (and tests) :-) > Add an HTTP POST utility method. > -------------------------------- > > Key: QUARKS-96 > URL: https://issues.apache.org/jira/browse/QUARKS-96 > Project: Quarks > Issue Type: Improvement > Components: Connectors > Reporter: Daniel John Debrunner > Assignee: Dale LaBossiere > Labels: newbie > > HTTPStreams.requests can support any type of request but it would be useful to have a utility method for POST requests, similar to getJson - i.e., a postJson() -- This message was sent by Atlassian JIRA (v6.3.4#6332)