PHP Classes

File: sample/request-image-sample.php

Recommend this page to a friend!
  Classes of Leonardo Di Sarli   PHP HTTP Request Library for Services   sample/request-image-sample.php   Download  
File: sample/request-image-sample.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP HTTP Request Library for Services
Send HTTP requests to Web services
Author: By
Last change:
Date: 9 months ago
Size: 360 bytes
 

Contents

Class file image Download
<?php

require_once __DIR__ . '/../vendor/autoload.php';

use
RequestService\Request;

$config = [
   
'your-service' => [
       
'url' => 'https://developer.marvel.com/',
       
'json' => false,
    ],
];

$sample = new Request($config);
$header = [
   
'stream' => true,
];

$response = $sample->sendRequest(
   
'your-service',
   
'GET',
   
'docs',
   
$header
);

print_r($response);