Skip to content

Instantly share code, notes, and snippets.

@derekperkins
Created June 23, 2014 18:15
Show Gist options
  • Save derekperkins/b7c99043f0ae64d4fd00 to your computer and use it in GitHub Desktop.
Save derekperkins/b7c99043f0ae64d4fd00 to your computer and use it in GitHub Desktop.
// Paste this code into line 918 of CakeRequest.php
/**
* Modify data originally from `php://input`. Useful for altering json/xml data
* in middleware or DispatcherFilters before it gets to RequestHandlerComponent
*
* @param string $input A string to replace original parsed data from input()
* @return void
*/
public function setInput($input) {
$this->_input = $input;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment