The Swoole\Http\Client class

Introduction

Class synopsis

Swoole\Http\Client
class Swoole\Http\Client {
/* Properties */
public $errCode;
public $sock;
/* Methods */
public void addFile(
    string $path,
    string $name,
    string $type = ?,
    string $filename = ?,
    string $offset = ?
)
public void close()
public void __destruct()
public void download(
    string $path,
    string $file,
    callable $callback,
    int $offset = ?
)
public void execute(string $path, string $callback)
public void get(string $path, callable $callback)
public bool isConnected()
public void on(string $event_name, callable $callback)
public void post(string $path, string $data, callable $callback)
public void push(string $data, string $opcode = ?, string $finish = ?)
public void set(array $settings)
public void setCookies(array $cookies)
public ReturnType setData(string $data)
public void setHeaders(array $headers)
public void setMethod(string $method)
public void upgrade(string $path, string $callback)
}

Properties

errCode

sock

Table of Contents