ducktyped
ducktyped

Reputation: 4504

How to clear or reset cookies in Titanium HttpClient

When a person logs in using their creds and then logs out, any subsequent user can log in without providing correct creds. I have googled around but all in vein. I tried using clearCookies() on HttpClient object, but it gives error:

req.clearCookies(); //req is an object of HttpClient

I also tried resetting cookies via

req.setRequestHeader( "Cookie", null );

but nothing works. Any help is highly appreciated. Thanks in advance.

ENVIRONMENT DETAIL

iPad 5.0 Ti SDK 1.7.2

Upvotes: 0

Views: 1584

Answers (1)

peterV
peterV

Reputation: 81

I had the same issue and solved it by specifying the full Host with "http://".

For example:

client.clearCookies("http://domaintyper.com");

It's not working without the http/https part.

Upvotes: 1

Related Questions