silkimen / cordova-plugin-advanced-http

Cordova / Phonegap plugin for communicating with HTTP servers. Allows for SSL pinning!
MIT License
400 stars 321 forks source link

[Feature] Send requests without cookie storage #440

Open Yentis opened 3 years ago

Yentis commented 3 years ago

I have an app that has multiple implementations of http request handlers (electron, cordova & chrome extension) where I work with setting the cookie directly in the header and parsing any response set-cookie headers myself but I'm unable to do this with this plugin.

Ideally I'd be able to do the same thing here, so perhaps call a function that disables the cookie storage globally which will then allow me to set the 'cookie' header manually and receive the 'set-cookie' header from any responses.

I've tried working around the problem by setting a cookie object from tough-cookie (and converting it to a string, because I can't pass the object directly) but it seems to be ignoring some properties such as SameSite which might be the cause of my implementation not working on some sites.

silkimen commented 1 year ago

Hi @Yentis, this is currently not supported and therefore this is a new feature request. I think your use-case should be covered when the plugin was exposing an API for using a custom Though Cookie Jar implementation? Would you or anyone else here provide a proposal or PR?