Difference between revisions of "Downloading web resources with http.stream - basics"

From MorphOS Library

(Introduction: List of features.)
(Introduction: Clarification on objects sharing.)
Line 3: Line 3:
 
The ''http.stream'' class is one of Reggae stream classes, in other words data sources. In a chain of Reggae objects, a ''http.stream'' instance will be always the first object, having only one, output port. A ''http.stream'' object may be also used standalone, not connected to anything, just to retrieve any data resource reachable via HTTP protocol and particularly its GET request. From this point of view, ''http.stream'' is just embeddable HTTP/1.1 client with simple yet powerful API. A brief list of its features is given below:
 
The ''http.stream'' class is one of Reggae stream classes, in other words data sources. In a chain of Reggae objects, a ''http.stream'' instance will be always the first object, having only one, output port. A ''http.stream'' object may be also used standalone, not connected to anything, just to retrieve any data resource reachable via HTTP protocol and particularly its GET request. From this point of view, ''http.stream'' is just embeddable HTTP/1.1 client with simple yet powerful API. A brief list of its features is given below:
 
* Socket API encapsulation. ''http.stream'' completely isolates application (and its programmer) from ''bsdsocket.library'' and TCP/IP stack. Only very basic knowledge of TCP/IP is needed to use ''http.stream'' with success.
 
* Socket API encapsulation. ''http.stream'' completely isolates application (and its programmer) from ''bsdsocket.library'' and TCP/IP stack. Only very basic knowledge of TCP/IP is needed to use ''http.stream'' with success.
* Unlike ''bsdsocket.library'' base instances, ''http.stream'' objects may be shared between processes.
+
* Unlike ''bsdsocket.library'' base instances, ''http.stream'' objects may be shared between processes (with the only exception that object must be disposed by proces which created it).
 
* The class has builtin parser of HTTP response headers.
 
* The class has builtin parser of HTTP response headers.
 
* The class has also an easy to use HTTP request header builder, so custom fields may be added to the header.
 
* The class has also an easy to use HTTP request header builder, so custom fields may be added to the header.

Revision as of 17:58, 26 August 2010

Grzegorz Kraszewski

Introduction

The http.stream class is one of Reggae stream classes, in other words data sources. In a chain of Reggae objects, a http.stream instance will be always the first object, having only one, output port. A http.stream object may be also used standalone, not connected to anything, just to retrieve any data resource reachable via HTTP protocol and particularly its GET request. From this point of view, http.stream is just embeddable HTTP/1.1 client with simple yet powerful API. A brief list of its features is given below:

  • Socket API encapsulation. http.stream completely isolates application (and its programmer) from bsdsocket.library and TCP/IP stack. Only very basic knowledge of TCP/IP is needed to use http.stream with success.
  • Unlike bsdsocket.library base instances, http.stream objects may be shared between processes (with the only exception that object must be disposed by proces which created it).
  • The class has builtin parser of HTTP response headers.
  • The class has also an easy to use HTTP request header builder, so custom fields may be added to the header.
  • HTTP proxies are supported.
  • The class supports chunked transfer and media streaming over HTTP.
  • Optional user agent spoofing is possible.
  • When connecting, HTTP redirections may be followed automatically.
  • The class is able to handle streams longer than 4 GB.
  • Easy protocol debugging via MediaLogger.