Download the PHP package ngawidev/nethttp without Composer

On this page you can find all versions of the php package ngawidev/nethttp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nethttp

NetHttp

Lightweight PHP HTTP client with fluent interface, cURL-powered.

Installation

Quick Start


Table of Contents


Client

Client holds connection configuration. Each Client::new() creates a fresh instance.

Method Description
Client::new() Create new client instance
base(string $url) Set base URL
userAgent(string $agent) Set default User-Agent (default: NetHttp/1.0)
sslVerify(bool) Enable/disable SSL verification (default: false)
defaultTimeout(int $seconds) Set default timeout (default: 300)
maxRedirects(int $max) Set max redirects (default: 5)
debug(bool) Enable debug mode
retry(int $times, int $delayMs) Set retry count and delay
proxy(string $ip, int $port) Set HTTP proxy
proxyHttp(string $ip, int $port) Set HTTP proxy
proxySocks5(string $ip, int $port) Set SOCKS5 proxy
proxyAuth(string $user, string $pass) Set proxy authentication
cookie() Enable cookies
cookieJar(string $path) Set cookie file (read/write)
cookieFile(string $path) Set cookie file (read only)
sendCookie(string $key, string $value) Send a cookie
sendCookies(array $cookies) Send multiple cookies
curlOpt(array $options) Set default cURL options
before(callable $callback) Add before middleware
after(callable $callback) Add after middleware
getLogs() Get request logs
clearLogs() Clear request logs

Request

Request is built from $client->request().

Method Description
get(string $url) Set GET request
post(string $url) Set POST request
put(string $url) Set PUT request
patch(string $url) Set PATCH request
delete(string $url) Set DELETE request
timeout(int $seconds) Set request timeout
connectTimeout(int $seconds) Set connection timeout
maxRedirects(int $max) Set max redirects for this request
gzip(bool) Enable gzip encoding
asFile(string $path) Save response to file
debug(bool) Enable debug for this request
curlOpt(array $options) Set cURL options for this request
send() Execute request and return Response

Response

Method Description
header(string $key) Get response header (case-insensitive)
json() Get data as array
xml() Get data as SimpleXMLElement
body() Get raw body as string

Headers


Authentication


Query Parameters


Request Body


File Upload


Download File


Proxy


Cookies


SSL


Timeout


Retry


Gzip


Zstd Auto Decode

Response dengan Content-Encoding: zstd atau zstd-compressed data akan otomatis di-decode jika ext-zstd terinstall.

Cek availability:

Kalau ext-zstd tidak terinstall:


Browser Mimic

Mimic browser fingerprint dengan versi yang presisi. Setiap browser mengirim headers yang berbeda, termasuk Sec-CH-UA (Client Hints) untuk Chrome/Edge.

Basic Usage

Supported Browsers

Browser Version Range Sec-CH-UA Sec-Fetch-*
Chrome 124 - 154 Yes Yes
Firefox 124 - 156 No Yes
Edge 124 - 154 Yes Yes
Safari 18 - 26 No No

Version Ranges

Header Details

Chrome 150 - includes Client Hints:

Firefox 153 - NO Client Hints (Firefox tidak kirim):

Safari 26 - NO Sec-Fetch (Safari tidak kirim):

Get Profile Info

Override Headers


Redirect


Curl Options


Middleware


Debug Mode

Output:


Request Logging


Concurrent Requests


Async/Await (Promise-like)

Async execution tanpa dependency external. Menggunakan curl_multi di backend.

Single Async

Async with Callbacks

Parallel Async Pool

Parallel with Callbacks


Error Handling


License

MIT


All versions of nethttp with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ngawidev/nethttp contains the following files

Loading the files please wait ...