You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

This service module contains the library of critical HTTP communication services. In here are the services that process the HTTP request, sets the relevant HTTP request header fields, sets the HTTP method, and then allows the developer to set the appropriate HTTP response header fields, status code, and body. Many of these services are called automatically from core routines (like the HTTP_MCP controller) so that the critical HTTP request details are accessible to the developer in a very convenient manner.

Application service module that helps build responses using various JSON formats.

Syntax

Response = HTTP_Services(Service, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)

Returns

The meaning of the response value depends on the service.

Parameters

ParameterDescription
ServiceThe name of the service being requested. Required.
Param1 - Param10Generic parameters.

Remarks 

The SRP HTTP Framework supports two popular JSON friendly data formats: HAL and Schema. HAL stands for Hypermedia Application Language and is an emerging format that implements the HATEOAS constraint of REST. There are other formats that are also emerging and none hold dominance at this point. Likewise, JSON itself stands alongside XML as a widely accepted general purpose format for representing resources. Therefore, if you need or prefer to use another format then you are welcome to extend HTTP_JSON_Services (in case you want to use a different hypermedia format, such as Collection) or write a new service such as HTTP_XML_Services (in case you want to use a different data format, such as XML).

Schema is a meta-data format. It is used to notify clients what kind of data is available, which is handy when user interfaces need to be dynamically built. Schema can be used to define if a prompt is text, numeric, date, combobox, Boolean, etc. Like HAL, Schema is also an emerging format. There are others that may be better suited to your needs.

Services

ServiceDescription
RunHTTPService

 

SetSelfURL

 

GetSelfURL

 

SetOECGIRequest

 

GetOECGIRequest

 

GetHTTPValue

 

SetRequestHeaderFields

 

SetRequestHeaderField

 

GetRequestHeaderFields

 

GetRequestHeaderField

 

SetQueryFields

 

SetQueryField 
GetQueryField 
SetResponseHeaderField 
GetResponseHeaderFields 
GetResponseHeaderField 
SetResponseStatus 
GetResponseStatus 
SetResponseBody 
GetResponseBody 
GetResponseBodyIsBinary 
GetResponse 
GetErrorResponse 
DecodePercentString 
ClearSettings 
GetHomeURL 
GetAPIRootURL 
GetCapturePath 
GetEnableAuthenticationFlag 
GetRealmValue 
GetEntryPointService 
GetVersion 
GetFullEndPointURL 

Param1 - Param10

The proper use of the generic arguments are defined in the definition of each service above.

  • No labels