TestProject Forum
Powered by leading experts in the test automation community

Set cookie for REST API request

Hi! I want to send restful API request with auth token set as cookie to complete an account update pre-step for my UI test scenario. Is there a way to do this by using the RESTful API Client addon?

Hi @swang,

Did you try to use the action “Add Cookie” from the “Web Extemsions” addon?

Hi @amit.yahav,

Yes, I have tried to use Add Cookie from “Web Extensions” addon. It works for webpage navigations perfectly. However, it does not seem to work with direct api calls :frowning:

Hi @swang,

Are you trying to include the auth token as a cookie in your request?
If that’s the case, you can also try using the “Execute JavaScript” action to send an AJAX call with that cookie.