PHP code example of interaapps / httprequest
1. Go to this page and download the library: Download interaapps/httprequest library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
interaapps / httprequest example snippets
use modules\httprequest\HttpRequest;
// Simple get
$res = HttpRequest::get("https://interaapps.de")->send();
$res->getData(); // Gets the body
$res->getCode(); // Gets the httpcode
// ...
// POST-Request
$res = HttpRequest::post("https://interaapps.de")
->parameter("username", "homer.simpson")
->parameter("username", "ilovedonuts")
->send();