InboundNameValue

The InboundNameValue handler can send and receive name value pair content.

Refer to 5.1.6 Web Browser Content.

When the RECEIVE command of this content handler is executed the following steps occur:

1.  If there is no content, an OK status is returned.

2.  The handler checks that the content type is application/x-www-form-urlencoded, if it is not this type an ERROR status is returned.

     The CONTENT keyword can be used to override this check and to allow the handler to receive the data.

     It is assumed the data is in the correct format.

3.  The handler decodes the name value pairs and binds the content to the program depending on the BIND keyword action.

Syntax:

Command

Keyword

Value

Developer notes

RECEIVE

HANDLER

InboundNameValue

 

BIND

*FIELD

Optional. Default. Set LANSA function fields with received name values.

*LIST

Optional. Put received name values in specified working list.

*BOTH

Optional. Set function fields, if field does not exist, put name value in specified working list.

PREFIX

*YES

Optional. Field has a single letter prefix which needs to be ignored. LANSAWeb posts name pairs with a single data type prefix letter.

*NO

Default. Field does not have a single letter prefix which needs to be ignored.

ENCODING

 

Optional. See ENCODING.
Used to convert field values.

NUMBERFORMAT

 

Optional. See NUMBERFORMAT.

CONTENT

 

Optional. See CONTENT.

 

Example

RECEIVE HANDLER(InboundNameValue) BIND(*LIST) #WRLST(NAME,VALUE)

 

When the SEND command of this content handler is executed the following occurs:

A name value pair record that is URL encoded is created from the working list argument.

Syntax:

Command

Keyword

Value

Developer notes

SEND

HANDLER

InboundNameValue

 

STATUS

value

Optional: HTTP status number.
Default: 200.

MESSAGE

value

Optional: HTTP status message.
Default: OK.

UAPATH

value

Optional. User agent save response path.

UAFILE

value

Optional. User agent save response filename.

UACACHE

value

Optional. Cache-Control max-age.
Default is 0.

UADISPOSITION

value

Optional. Content-Disposition filename.

ENCODING

 

Optional. See ENCODING.
Used to encode field values.

NUMBERFORMAT

 

Optional. See NUMBERFORMAT.

CONTENT

 

Optional. See CONTENT.

CHARSET

*YES

Optional. Include charset attribute.

*NO

Do not include charset attribute.

*TEXT

Default. Include charset attribute if content is text.

SPACE

*PLUS

Default. Encode spaces to +.

*BLANK

Encode spaces to blank.

*PERCENT20

Encode spaces to %20.

 

Example

SEND HANDLER(InboundNameValue) #WRLST(NAME,VALUE)