Skip to content

Instantly share code, notes, and snippets.

@sidchilling
Created November 30, 2012 19:53
Show Gist options
  • Select an option

  • Save sidchilling/4178129 to your computer and use it in GitHub Desktop.

Select an option

Save sidchilling/4178129 to your computer and use it in GitHub Desktop.
POST request with Requests
<?php
# Include Requests.php and autoloader
$response = Requests::request($url, array(), $data, Requests::POST); # empty array for headers if you want to send any
if ($response->success) {
$response = json_decode($response->body);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment