Reggae class: http.stream v51.13
  • MorphOS Developer
    Krashan
    Posts: 1107 from 2003/6/11
    From: Białystok...
    A new version of http.stream finally implements POST requests in addition to GET ones. Then it can be considered a lightweight (40 kB) HTTP/1.1 client. It can be not only used as a Reggae data source, but also standalone in any application using HTTP protocol for network communication. List of features:

    - Fully documented. ;-)
    - Handles all HTTP implementation details internally.
    - Parser for response header.
    - Allows for adding fields in the request header.
    - Builder for POST request body (request parts are passed via taglist).
    - Optional automatic redirection on 30x responses.
    - Handling of binary data in POST requests.
    - Proxy support.
    - Optional user agent spoofing.
    - More...

    The class may be downloaded from MorphOS Files. Note that it requires MorphOS 2.7+. An (unfinished) tutorial for programmers is available in the MorphZone Library

    [ Edited by Krashan on 2010/12/29 11:32 ]
  • »29.12.10 - 11:31
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    This is great! I've even red the example and understand it fully! My only problem is, actually, that I'm not familiar at all with plain C language, being myself spoiled my too many years of dumber computer languages.

    I have a question, though: How to know the error code, when the pull method fails? What's that "MediaGetPort(http, 0, MMA_ErrorCode)"?
  • »29.12.10 - 11:50
    Profile
  • MorphOS Developer
    Krashan
    Posts: 1107 from 2003/6/11
    From: Białystok...
    What's that "MediaGetPort(http, 0, MMA_ErrorCode)"?

    This is a function, which reads the error code from 'http' object. So it is exactly what you ask for.
  • »29.12.10 - 16:23
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    I guess I'd need a general course on "how are things done" on AmigaOS. My ignorance is not only about the languaga (that's not hard to learn), but also about the classes and they way they work.

    So I go back to profitable, boring enterprise programming. Me sucks!
  • »30.12.10 - 10:11
    Profile
  • MorphOS Developer
    Krashan
    Posts: 1107 from 2003/6/11
    From: Białystok...
    I guess you can take a look at Short BOOPSI Overview article in the MorphZone Library (and other MUI and Reggae tutorials). Both MUI and Reggae use BOOPSI as the object oriented framework. MorphOS programming is no more difficult than boring enterprise programming. ;-)
  • »30.12.10 - 10:49
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Quote:

    Krashan wrote:

    you can take a look at Short BOOPSI Overview article in the MorphZone Library


    I did. Got lost. Little time devoted, though. But even if I don't undrestand a thing from it, I just love to read those articles.

    Quote:

    MorphOS programming is no more difficult than boring enterprise programming.


    And it's WAY sexier. ;-)
  • »30.12.10 - 10:54
    Profile