
Lib_proweb
     http

---

//  , , , 

procedure open(url: String);
    url.

procedure set_property(key, value: string);
  key c  value.

procedure set_method(s: String);
 GET  POST

procedure set_body(s: String);
     POST

function request(): integer;
     .

function get_field(key: String): string;
     key  .

function get_fieldvalue(int s): string;
       ,   .

function get_fieldkey(int s): string;
       ,   .

function get_cookie(): string;
  cookie  . 

procedure close();
 ,   .

//   

function get_data_bg(): integer;
    .
0 -    .
1 -   .      get_data()  get_stream()

procedure get_data_stop();
   .  ,       get_stream();

function get_stream(): string;
   .       .

function get_data(): string;
        .  
      ,   ,   get_data_bg  get_stream.  

// 

procedure q_property(key, value: string);
  key c  value   q_request.

function q_request(url, method, body, gz: string): integer;
   url,  method   body,   gz    .
     q_property. 

 gz    :
"gzip" -    ,      gzip, get_dat   ,     .
"auto" -  gzip,         url   .
"none" -     .

         . 
 UTF-8,    Windows-1251, ISO-8859-5, MacCyrillic, KOI8-R

   .

function q_get_uri(): string;
 URI , ,    URL.   .


// 

function get_error(): string;
  ,   ,      .

function gunzip(gz_d: string): string;
     gz_d.

function gz_ratio(): integer;
    .

function str2rs(s: String): resource
  s  .

function rs2str(res: resource): string;
  res  . 

function encode(s, e, def: String): string;
  s   e ( "utf-8", "Windows-1251", "ISO-8859-5","MacCyrillic", "KOI8-R")    Unicode.
      def.


function base64_encode(String encoded): string;
   encoded   base64.

function base64_decode(String decoded): string;
   decoded   base64.


    Example
