PHP Classes

File: examples/get_xml_request.php

Recommend this page to a friend!
  Classes of Unay Santisteban  >  PHP REST Client Class  >  examples/get_xml_request.php  >  Download  
File: examples/get_xml_request.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP REST Client Class
Send REST request to a HTTP server
Author: By
Last change: Now the examples point to vendor/autoload.php
Date: 4 years ago
Size: 320 bytes
 

Contents

Class file image Download
<?php

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

try {

   
$api = new \OtherCode\Rest\Rest();
   
$api->configuration->url = "http://www.thomas-bayer.com/";
   
$api->setDecoder("xml");

   
$response = $api->get("sqlrest/CUSTOMER/22");
   
var_dump($response);

} catch (\
Exception $e) {

    print
$e->getMessage();

}

For more information send a message to info at phpclasses dot org.