mobilebackendgateway/app/Services/NanoSanteService.php

52 lines
1.1 KiB
PHP
Raw Normal View History

2021-10-19 13:38:30 +00:00
<?php
namespace App\Services;
use App\Traits\ConsumesExternalService;
class NanoSanteService
{
use ConsumesExternalService;
/**
* @var string
*/
public $baseUri ;
/**
* @var string
*/
public $key ;
public function __construct()
{
2021-10-20 12:30:57 +00:00
$this->baseUri = config('services.nano_sante_service.base_uri');
$this->key = config('services.nano_sante_service.key');
2021-10-19 13:38:30 +00:00
}
public function post($uri , $data, $headers)
{
return $this->perfomRequest('POST',$uri,$data,$headers);
}
public function postFiles($uri , $data, $headers)
{
return $this->perfomRequestWithFiles('POST',$uri,$data,$headers);
}
public function get($uri , $data, $headers)
{
return $this->perfomRequest('GET',$uri,$data,$headers);
}
public function put($uri , $data, $headers)
{
return $this->perfomRequest('PUT',$uri,$data,$headers);
}
public function delete($uri , $data, $headers)
{
return $this->perfomRequest('DELETE',$uri,$data,$headers);
}
}