View script | License | Download documentation as: HTML or editable |
Download script | History | Other scripts by: chrisrg |
30-Apr 14:01 UTC
[0.078] 13.536k
[0.078] 13.536k
Documentation for: rest.rREST-Friendly HTTP Protocol1. IntroductionAn elementary HTTP protocol allowing more versatility when developing Web Services clients: REST, SOAP or other. 2. UsageIt is best loaded to it's own context, no new global words are exposed: context load %rest.r This installs the rest:// protocol: rest://rebol.org Reading a rest:// URL returns an object: >> reborg: read rest://rebol.org >> ? reborg REBORG is an object of value: status integer! 200 headers object! [Date Server Last-Modified Accept-Ranges Content-E... content binary! #{ 323030300D0A3C21444F43545950452048544D4C2050554... type path! length: 2 length integer! 0
Providing a custom block affords some control over the HTTP request: read/custom rest://rebol.org [ action: 'get ] read/custom rest://myblog/posts/new [ action: 'post content: {This is text} type: 'text/plain ] read/custom rest://myblog/images/new [ action: 'put content: #{... some image binary ...} type: 'image/png headers: [auth: #MYPASS] version: 1.1 ]
3. Future
|