fittinq/symfony-businesscentral 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

fittinq/symfony-businesscentral

最新稳定版本:2.1.0

Composer 安装命令:

composer require fittinq/symfony-businesscentral

包简介

README 文档

README

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

Table of Contents

Introduction

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

Installation

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

composer require fittinq/symfony-BusinessCentral

Usage

To use the BusinessCentralHttpClient, follow these steps:

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

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

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

Configuration

Add the following parameters to your environment

BUSINESSCENTRAL_USERNAME=
BUSINESSCENTRAL_PASSWORD=

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-03-05