komtcho/shot 问题修复 & 功能扩展

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

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

komtcho/shot

Composer 安装命令:

composer require komtcho/shot

包简介

Build classes for HTTP request

README 文档

README

Calling HTTP requests by class encapsulating

Example:-

<?php

use Komtcho\Shot\Contracts\ShootingGet;
use Komtcho\Shot\Contracts\WithHeaders;
use Komtcho\Shot\Shooting;

class Request extends Shooting implements WithHeaders, ShootingGet
{
    protected $url = 'https://webhook.site/9148264c-19c9-4c35-b0f9-0d71cdec3c9d';

    public function headers(): array
    {
        return [
            'X-First' => 'foo',
            'X-Second' => 'bar',
        ];
    }

    public function query(): array
    {
        return [];
    }
}

// Calling
$request = new Request;
return $request->call();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-31