Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Peticiones HTTP get sin Curl
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$url = 'https://jsonplaceholder.typicode.com/posts';
$response = Requests::get($url);
## $response->body es el resultado de la petición
echo(json_encode($response));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.