eglx.http defines an API for accessing details in HTTP messages.
enumeration HttpMethod _GET = 1, POST = 2, _DELETE = 3, PUT = 4 end |
handler HttpRest implements IHttp
request Request;
response Response;
restType eglx.rest.ServiceType?;
function getRequest()returns(Request)
return(request);
end
function getResponse()returns(Response)
return(response);
end
end
|
handler Request uri string?; // Complete URL, encoded for HTTP use method HttpMethod?; // Method being invoked. Default is _GET. encoding Encoding?; // As described in relation to the eglx.services package. charset string?; // character encoding; for example, "UTF-8". contentType string?; // content type; for example, "text/html". headers dictionary?; // each entry identifies a header name and content. body string?; // content of transported message. timeout int?; // as described next. end timeout specifies the
maximum valid number of seconds that elapse between two events:
If the response takes longer than the specified maximum, the EGL Runtime throws a ServiceInvocationException. Setting
a timeout is partly a matter of trial and error:
For Rich UI, you can override the value by setting the timeout property on the call statement that invokes the service. The default is an infinite wait. |
handler Response status int?; statusMessage string?; encoding Encoding?; charset string?; contentType string?; headers dictionary?; body string?; end |
interface IHttp
function getRequest()
returns
(eglx.http.Request);
function getResponse()
returns
(eglx.http.Response);
end
|
| HTTPLib external type |