Versions Compared

Key

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

Sets all of the Query Fields based on the content of the HTTP request that the OECGI creates. This assumes the SetOECGIRequest service has already been called so that the Request array is in memory.

Syntax

Code Block
Response = HTTP_Services('SetQueryFields')

Returns

N/A

Parameters

N/A

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.

This assumes the SetOECGIRequest service has already been called so that the Request array is in memory. The SetQueryField service is used to perform the actual setting of the values. Query Fields are what appears at the end of a URL which are in this format:

?<field1>=<value1>[&<field2>=<value2>]

Hence, an example of a full URL with a Query Field would look like this:

https://www.mysite.com/api/contacts?name=smith

Query Fields are often used by an API to filter content. The SetQueryFields service provides a similar functionality as the Inet_QueryParam function, although the latter is only useful with the RUN_OECGI_REQUEST dispatch routineThe RemainingURL argument will contain the value of the remaining portion of the URL that follows the current URL segment. Examples of managing this are found in the HTTP_Entry_Point_Services routine.