Filter user actions by a http method

Hey all,

I’m trying to define a couple of user actions same xhrurls, but a different http method.

Any way to do this? I tried to add a placeholder “httpMethod” linked to metadata + define user action with xhrurl + httpMethod equal to my verb, but it seems to not work.

Would the “session and action properties” work with the custom-defined property / server-side request feature? Any example of how to do this?

Thanks for your help!

Hello @laurent,

My opinion below :

HTTP method is only available on request side not on user actions side.
So you can create a request attribute to catch the HTTP Method and define this request attribute as a user action properties (it will work only for XHR actions because you will have lot of values during loading page action) :

However, you can’t use user action property as a placeholder in naming rules :

On your case, I recommend using data dtname :

"If the standard action name detection doesn’t serve your purpose, you can also set the data-dtname custom attribute within the HTML tags and use it as a caption. " :

Regards,

Hi @laurent, did the comment above help you solve your issue? Or maybe you found your own solution? Thanks for letting the Community know!

Another way:
If no one agent (only rum)

If no time to mark dtname for all XHR (usually if dtname marks is not a part of SDLC - you will wait for implementation CR)

Ask developers add add parameter or anchor in the query dispatcher method,
than You can parse is via placeholders and create a rule

e.g. {method} {xhr url}

it will be cheap, fast generic solution applied automatically to all XHR you have