eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HTTPSimpleJSONRestClient':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: HTTPSimpleJSONRestClient


Inheritance:

   Object
   |
   +--HTTPSimpleJSONRestClient

Package:
stx:goodies/communication
Category:
Net-Communication-Rest
Version:
rev: 1.7 date: 2021/02/12 20:09:09
user: cg
file: HTTPSimpleJSONRestClient.st directory: goodies/communication
module: stx stc-classLibrary: communication

Description:


Abstract superclass for JSON based Rest service clients.
This passes arguments as JSON post-data.
Callable methods can be automatically detected via the protocolInfo rest call,
if the partner is an ST/X based rest service.
See concrete subclasses on how the call interface works.

[start Server with:]
    HTTPServer startServerOnPort:9876

[start a Demo Service with:]
    (HTTPSimpleJSONRestDemoService new)
        linkName:'/rest';
        registerServiceOn:(HTTPServer serverOnPort:9876)

[request:]
    |client|

    client := self newForURL:'localHost:9876/rest'.
    (client call:'protocolInfo') inspect.
    (client call:'string') inspect.


[instance variables:]

[class variables:]

copyright

COPYRIGHT (c) 2015 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

instance creation
o  newForURL: baseUrlArg


Instance protocol:

accessing
o  baseUrl

o  baseUrl: aURLOrString
Modified (format): / 12-02-2021 / 21:03:32 / cg

calling
o  call: name

o  call: name with: argument
argument is usually a dictionary with key-value assocs



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:33:26 GMT