public static function configure() {
    $config = \BoletoSimples::$configuration;

    $oauth2 = new Oauth2Subscriber();
    $oauth2->setAccessToken($config->access_token);

    self::$client = new Client([
      'base_url' => $config->baseUri(),
      'defaults' => [
        'headers' => [
          'User-Agent' => $config->userAgent()
        ],
        'auth' => 'oauth2',
        'subscribers' => [$oauth2]
      ],
      'verify' => false
    ]);

    self::$default_options = ['headers' => ['Content-Type'=> 'application/json'], 'exceptions' => false];
  }
public static function configure() {
    $config = \BoletoSimples::$configuration;

    $oauth2 = new Oauth2Subscriber();
    $oauth2->setAccessToken($config->access_token);

    self::$client = new Client([
      'base_url' => $config->baseUri(),
      'defaults' => [
        'headers' => [
          'User-Agent' => $config->userAgent()
        ],
        'auth' => 'oauth2',
        'subscribers' => [$oauth2]
      ],
      'verify' => false
    ]);

    self::$default_options = ['headers' => ['Content-Type'=> 'application/json'], 'exceptions' => false];
  }
public static function configure ( ) { $ config = \ BoletoSimples :: $ configuration ; $ oauth2 = new Oauth2Subscriber ( ) ; $ oauth2 -> setAccessToken ( $ config -> access_token ) ; self :: $ client = new Client ( [ 'base_url' => $ config -> baseUri ( ) , 'defaults' => [ 'headers' => [ 'User-Agent' => $ config -> userAgent ( ) ] , 'auth' => 'oauth2' , 'subscribers' => [ $ oauth2 ] ] , 'verify' => false ] ) ; self :: $ default_options = [ 'headers' => [ 'Content-Type' => 'application/json' ] , 'exceptions' => false ] ; }
Configure the GuzzleHttp\Client with default options.
Configure the GuzzleHttp \ Client with default options .