How to post a set-cookie value from the httpresponse header to the x-www-form-urlencoded
Author: SandeepApsingekarCreated Jan 31, 2017Updated Oct 4, 2021
Hi,
I want to send a cookie name and value to access a method in an api(that is, api/someMethod). I'm able to get the cookie value in a string array. Now I want to send the same value using PostAsync method of httpclient to the method. The problem is, I cannot send the string array inside postasync method. As, PostAsync method accepts only httpcontent. So, if the string array is not allowed in postasync then i'm not sure what will be the best way to access a cookie name and value and send it to the post async method.
Any help would be appreciated. I look forward to hear from you!
Thank You!
Best Regards, Sandeep
Source: matthew-andrews/isomorphic-fetch