Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Sets the indicated Response Header Field with the indicated value. This can then be retrieved with a GetRequestHeaderField service call so that server processing can operate accordingly.

...

Code Block
Response = HTTP_Services('RunHTTPServiceSetResponseHeaderField', Name, HTTPServiceValue, RemainingURLAppend)

Returns

N/A

Parameters

ParameterDescription
NameHeader Field Name to set.HTTPServiceThe HTTP (or web) service to call.. Required.
ValueValue for the header field. This will be Trimmed to enforce proper formattingRemainingURLThis is the remaining portion of the URL that has not yet been processed by previous servicesRequired.

Remarks

The RunHTTPService service is the official way to call specific web service APIs. The HTTPService argument should contain the same name found in the URL segment that corresponds with the API resource. For instance, for the /customers URL, the HTTPService argument should contain the value of customers. This will call the HTTP_CUSTOMERS_SERVICES BASIC+ routine.

...

Append

Flag that determines if values can be appended to a list. By default this is false and all values will replace existing values. Optional.

Remarks

Any value can be entered for the Name argument, but there is a pre-defined list of standard HTTP response header field names which have been defined as metadata for this service to make it easier for the developer to select one. The current list is as follows:

Access-Control-Allow-Headers
Access-Control-Allow-Methods
Access-Control-Allow-Origin
Allow
Content-Encoding
Content-Language
Content-Length
Content-Location
Content-Disposition
Content-Type
Date
Expires
Last-Modified
Link
Location
Retry-After
Server
Set-Cookie
Transfer-Encoding
Vary
WWW-Authenticate