Skip to content

Instantly share code, notes, and snippets.

@cameronjacobson
Last active December 11, 2015 02:48
Show Gist options
  • Save cameronjacobson/4533300 to your computer and use it in GitHub Desktop.
Save cameronjacobson/4533300 to your computer and use it in GitHub Desktop.
reading AngularJS POST with PHP
<?php
// If you don't want to depend on HTTP client to serialize POST body into URI
// encoded format
// ** For Example: AngularJS doesn't natively POST the same way jQuery does.
$post = json_decode(file_get_contents('php://input'), true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment