An HTTP adapter for Flysystem that uses basic PHP functions.

0.2.0 2016-11-19 00:21 UTC

This package is auto-updated.

Last update: 2024-03-26 08:13:00 UTC


Author Build Status Coverage Status Quality Score Software License Packagist Version

This adapter uses basic PHP functions to access HTTP resources. It is read only.


composer require twistor/flysystem-http


use League\Flysystem\Filesystem;
use Twistor\Flysystem\Http\HttpAdapter;

$filesystem = new Filesystem(new HttpAdapter(''));

$contents = $filesystem->read('file.txt');

By default, metadata will be retrieved via HEAD requests. This can be disabled.

use Twistor\Flysystem\Http\HttpAdapter;

$supportsHead = false;

$adapter = new HttpAdapter('', $supportsHead);

PHP context options can be set using the third parameter.

use Twistor\Flysystem\Http\HttpAdapter;

$context = [
    'ssl' => [
        'verify_peer' => false,
        'verify_peer_name' => false,

$adapter = new HttpAdapter('', true, $context);