Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76594 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83901 invoked from network); 17 Aug 2014 00:10:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Aug 2014 00:10:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=are.you.winning@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=are.you.winning@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.45 as permitted sender) X-PHP-List-Original-Sender: are.you.winning@gmail.com X-Host-Fingerprint: 209.85.216.45 mail-qa0-f45.google.com Received: from [209.85.216.45] ([209.85.216.45:61713] helo=mail-qa0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/C1-65521-CE2FFE35 for ; Sat, 16 Aug 2014 20:10:21 -0400 Received: by mail-qa0-f45.google.com with SMTP id cm18so3195879qab.4 for ; Sat, 16 Aug 2014 17:10:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=aSKui4JQoZEZWAzBVdExuf7+YZJ1avcqWsRoHELTz2k=; b=HgA1fmjxwMTRgxZDXz92zvQZ4LgEOv0jWDmndd8ytanR+XEYrtEyVtMR/9An9X6Nxr beeVfAcn71eVFpjONHPlZrrke9TNA4+7XRvRUqxEArqVCkUV4ies36bd8/A4GjmnkvPK 5Yvp7/RLjs3R6l5nlxlWZFeu+qcIIhukPf/GZSoHEpS5EJf6//0UEm5f0h1X0qq5LXCD InM+SCirQntKI3wQtKNYjYicMtyUAy/9VJEenELCdVGZ5F0lr278IHKOmaqSotXdclI/ Ue1i8wIm/HL9YCsAKSA3Pfyd7HD/RW2qGfgPtGAEvHRtxmD2JVH45b+k6kTWnZn9Gw5O tDUw== MIME-Version: 1.0 X-Received: by 10.224.75.130 with SMTP id y2mr41851794qaj.72.1408234217740; Sat, 16 Aug 2014 17:10:17 -0700 (PDT) Sender: are.you.winning@gmail.com Received: by 10.229.64.196 with HTTP; Sat, 16 Aug 2014 17:10:17 -0700 (PDT) In-Reply-To: References: Date: Sun, 17 Aug 2014 01:10:17 +0100 X-Google-Sender-Auth: xb_1nQ_JZ4x1JGx_hGOcoddzTh4 Message-ID: To: Park Framework Cc: Chris Wright , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Native support - PUT request, multipart form data From: cw@daverandom.com (Chris Wright) On 17 August 2014 00:47, Park Framework wrote: > Variable $_PUT is already a popular name. > Many for yourself already so it was called, at the bottom link. > http://stackoverflow.com/search?q=PHP+%24_PUT > > But I like the name $_DATA - it is universal for any request method. IMO $_BODY would make more sense, $_DATA is very ambiguous. > For frontend developers, this name is very clear: > $.ajax({ > type: "PUT", > contentType: "application/json", > data: {"name": "value"} > }); > > Except multipart form data, needed and native support for application/json. > > 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. For the record, IMHO what is required here is a *bundled* OO request abstraction extension, which would expose the underlying parser routines in such a way that conversions of the input to a data structure can be done with a single call. but *not* make any assumptions about what is being done in the application. It has never sat well with me that multipart inputs cannot be accessed as a raw string. I haven't actually given any though to what this API would look like though...