Forum Discussion

p3365y's avatar
p3365y
New Contributor
6 years ago

ServiceV: Virt Dispatch rule to fire if header does not exist

How do I get a Parameter Dispatch Strategy rule to fire if a header does not exist in a request?

I can check if a header value exists, but I want to return a specific status code if it doesn't exist.

How do I do that?

  • Hi,

     

    It is my understanding that you should do Script Dispatch, but not Parameter one.

     

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    It is my understanding that you should do Script Dispatch, but not Parameter one.

     

    • p3365y's avatar
      p3365y
      New Contributor

      This is crazy, why isn't this a standard option?

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Have no idea...

        Maybe because REST parameters are passed in the URL and are user-controllable while header data is something that is beyond end-user control.