HTTPMethod property: Message class

Description

Use this property to return an integer constant representing the HTTP request method that was specified by the subscribing node (the consumer) in REST-based service operations. The request method determines the proper response message to send.

Value Description

%IntBroker_HTTP_GET

HTTP GET method – Requests a representation of a resource.

%IntBroker_HTTP_POST

HTTP POST method – Submits data to be processed to the specified resource. This might result in the creation of a new resource or updates to an existing resource or both.

%IntBroker_HTTP_DELETE

HTTP DELETE method – Deletes the specified resource.

%IntBroker_HTTP_PUT

HTTP PUT method – Uploads a representation of the specified resource. This might result in the creation of a new resource or updates to an existing resource or both.

%IntBroker_HTTP_HEAD

HTTP HEAD method – Requests a representation of a resource without the response body that would be returned in a GET request.

This property is read-only.

Example

If &MSG.HTTPMethod = %IntBroker_HTTP_POST Then
   /* populate the POST response data */
End-If;

If &MSG.HTTPMethod = %IntBroker_HTTP_GET Then
   /* populate the GET response data */
End-If;