I want to set cookie for a path that matches an exact regex. For example, consider that I have the below APIs
sample/resource
sample/resource/1234 *(here, '1234' is resource's id)*
sample/resource/1234/action
Here, I want to send a cookie from the site for the first and third APIs. But, When going through cookie's documentation, I believe it is impossible to set cookie for a regex path.
Is there any workaround for this? or if it is completely impossible, I want to atleast send a cookie for 2nd API alone. But, I can't do that as the resource's id is not static and can be any number. Thanks in advance.