# final class \SmartHttpUtils
{ } ::

Class: Smart HTTP Utils - provides utils function to work with HTTP protocol.

- Language: PHP
- Located at: lib/framework/lib_http_cli.php
- Package: @Core:Network
- Namespace: \
- Class Name: SmartHttpUtils
- Version: v.20240118
- Depends: classes: Smart, SmartHashCrypto, SmartFrameworkSecurity
- Hints: It is recommended to use the methods in this class instead of PHP native methods whenever is possible because this class will offer Long Term Support and the methods will be supported even if the behind PHP methods can change over time, so the code would be easier to maintain.
- Usage: static object: Class::method() - This class provides only STATIC methods

## class Methods

public static function parse_http_headers ( string $raw_headers ) {} :: ARRAY
public static function encode_var_cookie ( string $name, string $value ) {} :: STRING
public static function encode_var_post ( string $name, string $value ) {} :: STRING
public static function http_multipart_form_delimiter ( ) {} :: STRING
public static function http_multipart_form_build ( string $delimiter, array $fields, array $files ) {} :: STRING
public static function chunked_part_decode ( string $chunk ) {} :: STRING
@return: {string} the decoded message.
@param: {string} $chunk: the encoded message
Dechunk a HTTP 'transfer-encoding: chunked' part (Ex: Body)
If The Chunked Part was not encoded properly it will be returned it unmodified.

## class Properties

## class Constants

public const AUTH_USER_BEARER = ":BEARER" ; ::
public const MAX_HEADER_SIZE = 16384 ; ::

## Sample code: PHP

`

    <?php

    // Usage example:
     Smart::some_method_of_this_class(...);

    // #end php code

`

documentation generated on: 2024-12-16 16:53:45 +0000

Smart.Framework © 2009-2024 unix-world.org