2017 © Pedro Peláez
 

library http-data

Http data compression and serialization

image

datrim/http-data

Http data compression and serialization

  • Wednesday, March 9, 2016
  • by datrim
  • Repository
  • 1 Watchers
  • 0 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

HttpData

HttpData is a simple package for encoding and decoding data to be sent via http requests., (*1)

Installation

Composer

From the command line, run:, (*2)

composer require datrim/http-data

Usage

The Basics

With the package now installed, you may use the two classes like so:, (*3)

Encoding data (compressed)

<?php

use Datrim\HttpData\HttpDataEncoder;

$data = [
    'name' => 'MyData',
    'value' => 'My data value'
];

To encode data compressed (default), (*4)

$encoder = new HttpDataEncoder($data);

or, if the data should be transmitted uncompressed., (*5)

    $encoder = new HttpDataEncoder($data, false);

Then to get the encoded data:, (*6)

$encoded Data = $encoder->data();

Decoding data

<?php

use Datrim\HttpData\HttpDataDecoder;

$decoder = new HttpDataDecoder($encodedData);
$decodedData = $decoder->data();

That's it!, (*7)

License

The HttpData package is open-sourced software licensed under the MIT license, (*8)

The Versions

09/03 2016

dev-master

9999999-dev

Http data compression and serialization

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Chris Pritchard

http serialization data compression

09/03 2016

1.0.0

1.0.0.0

Http data compression and serialization

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

by Chris Pritchard

http serialization data compression