定制 fittinq/symfony-katoen-natie 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fittinq/symfony-katoen-natie

最新稳定版本:2.0.0

Composer 安装命令:

composer require fittinq/symfony-katoen-natie

包简介

README 文档

README

The Symfony KatoenNatie HTTP Client, KatoenNatieHttpClient, is designed to simplify HTTP requests to KatoenNatie services with added headers and authentication.

Table of Contents

Introduction

The KatoenNatieHttpClient class is a Symfony component that enhances the standard Symfony HttpClient. It adds headers, authentication credentials, and custom options for making requests to KatoenNatie services.

Installation

To use the Symfony KatoenNatie HTTP Client in your project, you can include it via Composer.

composer require fittinq/symfony-katoenNatie

Usage

To use the KatoenNatieHttpClient, follow these steps:

  1. Create an instance of the KatoenNatieHttpClient class, providing it with the required dependencies: HttpClientInterface, username, password, and API key.

    use Fittinq\Symfony\KatoenNatie\KatoenNatieHttpClient;
    use Symfony\Contracts\HttpClient\HttpClientInterface;
    
    $httpClient = new HttpClient(); // Replace with your actual HttpClient instance.
    $username = '%env(KATOENNATIE_USERNAME)%';
    $password = '%env(KATOENNATIE_PASSWORD)%';
    $apiKey = '%env(KATOENNATIE_API_KEY)%';
        
    $katoenNatieHttpClient = new KatoenNatieHttpClient($httpClient, $username, $password, $apiKey);
    
  2. You can use the request method to send HTTP requests to KatoenNatie services. It automatically adds headers for Content-Type, login, password, and apiKey.

    $url = 'https://katoenNatie-service-url';
    $options = ['headers' => ['custom-header' => 'value']];
        
    $response = $katoenNatieHttpClient->request('GET', $url, $options);
    

Configuration

Add the following parameters to your environment

KATOENNATIE_USERNAME=
KATOENNATIE_PASSWORD=
KATOENNATIE_API_KEY=

统计信息

  • 总下载量: 36
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-11-20