ResponseInterface.php 639 字节
<?php


namespace Lackoxygen\TopWarehouse\Contracts;

interface ResponseInterface
{
    /**
     * get http code
     *
     * @return int
     */
    public function getStatusCode(): int;

    /**
     * api business success
     *
     * @return bool
     */
    public function isSuccess(): bool;

    /**
     * get response text
     *
     * @return string
     */
    public function getContents(): string;

    /**
     * response text to array
     *
     * @return array
     */
    public function toArray(): array;

    /**
     * response text to json
     *
     * @return string
     */
    public function __toString();

}