Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76605 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21070 invoked from network); 17 Aug 2014 10:49:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Aug 2014 10:49:20 -0000 Authentication-Results: pb1.pair.com header.from=dz@heroku.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dz@heroku.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain heroku.com designates 74.125.82.49 as permitted sender) X-PHP-List-Original-Sender: dz@heroku.com X-Host-Fingerprint: 74.125.82.49 mail-wg0-f49.google.com Received: from [74.125.82.49] ([74.125.82.49:64837] helo=mail-wg0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 79/50-18958-DA880F35 for ; Sun, 17 Aug 2014 06:49:18 -0400 Received: by mail-wg0-f49.google.com with SMTP id k14so3925379wgh.32 for ; Sun, 17 Aug 2014 03:49:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=8jN39BhXvcsOgbQ2VZr2g+k57l0aAW8jfeUEk+Hge4E=; b=m6qfl8lpIW/mrxrl796NMe+ITFEz78J5kSzwNhuf1SHFijbJh2qRUGyULlbd1DWEmu mKGDGAb/59wBBZE3EZRuQltMr4alKaIfmh1L1OckUawc5TvZnXOZJPLiHXBOzvusQFWW FvmaZxExgs2eOLqw9DnBvIiVEwP4Yc134jwiP/kDbDnBHP6926drhJ2vKfHl28P7M4pE FUezMZJnaSuDCfbW7j7kCrHe30m7IM1JjrbYrnZsLhJ8mXZfJ7xnVucvL1JoVH5FQ+4j XEag3hPZMGp+9OA/++DjCtzjBWIOaFFjl3CPBC+ZLkGWyT0R9cPwgdyMK55l5rHwORcu O6RA== X-Gm-Message-State: ALoCoQlGjP3nfizu9OJWDYmc4mKJ8WNM/ld6x599Hd1BUB9melugmthhRLOKw1A/9/ojrYuPSq/F X-Received: by 10.180.189.210 with SMTP id gk18mr68275344wic.82.1408272553949; Sun, 17 Aug 2014 03:49:13 -0700 (PDT) Received: from [172.20.10.3] (ip-109-84-3-225.web.vodafone.de. [109.84.3.225]) by mx.google.com with ESMTPSA id u5sm26127038wia.17.2014.08.17.03.49.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 Aug 2014 03:49:13 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: <20140817021822.9AEBE261C47@dd15934.kasserver.com> Date: Sun, 17 Aug 2014 12:49:10 +0200 Cc: internals@lists.php.net, cw@daverandom.com, park.framework@gmail.com Content-Transfer-Encoding: quoted-printable Message-ID: References: <20140817021822.9AEBE261C47@dd15934.kasserver.com> To: Thomas Bley X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] Native support - PUT request, multipart form data From: dz@heroku.com (David Zuelke) That does not make any sense; applications could accept XML, CSV or = whatever else just as well. The original proposal is not very useful. $_GET contains parsed query = string info, $_POST contains parsed HTTP request body information if the = media type is application/x-www-urlencoded or multipart/form-data. = Deserializing that makes sense as the rules for it are in the HTTP spec. $_PUT/$_BODY/$_DATA would then have to contain the raw body contents, at = least if the media type isn't one of the above, for consistency. That'd = saves the file_get_contents() call, and given how a request handler uses = at most once, I'm not sure such a change is worth it. David On 17 Aug 2014, at 04:18, Thomas Bley wrote: > Since we get JSON data, I would also consider $_JSON. >=20 > Regards > Thomas >=20 >=20 > Park Framework wrote on 17.08.2014 01:47: >=20 >> Variable $_PUT is already a popular name. >> Many for yourself already so it was called, at the bottom link. >> http://stackoverflow.com/search?q=3DPHP+%24_PUT >>=20 >> But I like the name $_DATA - it is universal for any request method. >> For frontend developers, this name is very clear: >> $.ajax({ >> type: "PUT", >> contentType: "application/json", >> data: {"name": "value"} >> }); >>=20 >> Except multipart form data, needed and native support for = application/json. >>=20 >> In many languages (Java, Python, ASP), it has long been there. >> It is a pity that the PHP in 2014, it has not yet implemented. >>=20 >>=20 >>=20 >> 2014-08-17 2:14 GMT+03:00 Chris Wright : >>=20 >>> On 16 August 2014 23:41, Park Framework = wrote: >>>> This is necessary for convenient use RESTful API. >>>>=20 >>>> file_get_contents('php://input') - Very inconvenient >>>>=20 >>>> I would like to finally get native support for PHP, preferably = version >>> 5.6 >>>=20 >>> The window for getting new features into 5.6 has passed, quite a = long time >>> ago. >>>=20 >>> Also, there is no $_PUT superglobal (and personally I do not think >>> there should be one), and it would not make sense to put this data >>> into $_POST (or any existing superglobal). Please explain the API = you >>> envisage to get this working. >>>=20 >>=20 >=20 >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20