AnsweredAssumed Answered

Is it possible to override the HTTP Method before calling a Route via HTTP(s) assertion?

Question asked by ygirouard_stm on Oct 5, 2018
Latest reply on Oct 5, 2018 by ygirouard_stm

In some cases, clients are only able to send GET or POST requests to an API that might require other methods such as PUT or DELETE. A common way to work around that is to use the X-HTTP-Method-Override header in order to state that you really want to use method PUT for example even though you used a POST.

 

From what I can see it's not possible to set the Method property of a Route via HTTP(S) assertion to other than either <automatic> or one of the values listed in the drop-down.

 

Apart from having to use multiple Route assertions each with its own method in order to use the appropriate one based on the X-HTTP-Method-Override value, is there a way to set a context variable to override request.http.method which is read-only?

Outcomes