
Lib_web -      

---------------------------------------------------------------------------------------------------------------

integer open(string url) -     /.
     -1     0  - .
    
integer opened -   
     -1     0  - .
    
close -  

set_property(string s1, string s2) -  - 
    s1 -  
    s2 -  
       :
Accept -        ,    ,  ,   */*
    Accept-Charset -   ,  .
Accept-Encoding -     Accept       .
    Accept-Language -     .
Allow -     ,    .
Authorization -   : "",            ,    .             403 (  ).
    Content-Encoding -    . : Content-Encoding: gzip
Content-Language -   . ,         : Content-Language: ru, en.
    Content-Length -       .
Content-Type -      .  ,  gif-: Content-Type: image/gif.
Date -    ,      .     ,  : Date: Fri, 15 Aug 2002 10:00:00 GMT.
Expires -           .          .   ,     Date.      ,     .
From -  HTTP-, ,   ""    .   : From: ildar@arat.ru.       .
Host -     URL    ,    GET  : GET /pub/WWW/ HTTP/1.1      Host: www.w3.org      ,         http://www.w3.org/pub/WWW/
If-Modified-Since -        GET.   ,        .    ,      304.
    If-Unmodified-Since -    .
    Last-Modified - C      .
    Location -     "" .
MIME-Version - ,    ,     MIME.        .
Referer - ,     ,     .        ,      -  .      .
Retry-after -   ,  ,         .  ,       ,      503.
    Server -      HTTP-.
    User-Agent -      HTTP-.
WWW-Authenticate -    ,        .    401. .  Authorization
    
set_method(string m) -    .  :
GET  C      ,   ,     - .
POST  C      ,      -  (,   cgi-).          HTML-.
HEAD  C      ,   ,       -  ( ,   !).
PUT - C      ,      -        - .  ,        :-(
DELETE - C      ,   ,    - . ,   ? :)))
TRACE - ,     . ,      .

string get_header(string s) -   ()   .         ,         set_property

string get_name(integer s) -      ,    ???

integer set_body(string s) -    .     - ,   .
     -1     0  - .

integer send -    ,      (. set_property)     (. set_method)
       .     :
          - , ,     .     100  199.
    100 Continue -     .
    101 Switching Protocols -      ,    Upgrade.
          -   :
    200 OK -    ,       .
    201 Created -   ,       .      Location.
    202 Accepted -  ,     .      .
    203 Non-Authoritative Information -      ,     .
    204 No Content -   ,  -        .
    205 Reset Content -      ()    ()  .
    206 Partial Content -       .
          -   300  399 -    ,    ,         .
    300 Multiple Choices -  URL   .         .        ,  .
    301 Moved Permanently -       URI,    Location.
    302 Moved Temporarily - ,        URI,    Location.
    303 See Other -  URI      ,     GET.
    304 Not Modified -         If-Modified-Since, ,          .
    305 Use Proxy -        -,    Location.
           -    4.        .
    400 Bad Request -    .    .
    401 Unauthorized -     .      Authorization.
    402 Payment Required - ,     HTTP .
    403 Forbidden -   ,     . ,    .
    404 Not Found -    URL  .
    405 Method Not Allowed -       .         Allow.
    406 Not Acceptable -     ,       .
    407 Proxy Authentication Required -   ,        -.
    408 Request Time-out -    ,      .    .
    409 Conflict -           .          .
    410 Gone -          .
    411 Length Required -      -      Content-Length   .
    412 Precondition Failed -        .
    413 Request Entity Too Large -       -    .    ,       Retry-After.
    414 Request-URL Too Long -          .
    415 Unsupported Media Type -     -   ,        .
          -  ,    ,   ,   500-  599-.
    500 Internal Server Error -     ,     .
    501 Not Implemented -         .
    502 Bad Gateway -       ,     .
    503 Service Unavailable -     ,          .
    504 Gateway Time-out -            .
    505 HTTP Version not supported -     HTTP,    .

string get_response -      

