Order of Operations between Attributes and GatewayRequestFilters

One can control the order of operations between Service Request/Response Attributes and GlobalRequest/Response Filters using the Priority property on the attribute. Setting the priority to a negative value makes the attribute happen before the GlobalRequestFilters, making it an ideal place to set up the CacheInfo object (if the filter is going to modify that object).

I’m wondering if you can similarly control execution order of Attributes and the GatewayRequestFilters, for a similar purpose.

No, gateway requests don’t have a separate request pipeline for executing filter attributes. It just calls:

  • AppHost.GatewayRequestFilters
  • AppHost.GatewayRequestFiltersAsync
  • Validation

Before executing the API.