How to use the canonicalDomain function from tough-cookie

Find comprehensive JavaScript tough-cookie.canonicalDomain code examples handpicked from public code repositorys.

16
17
18
19
20
21
22
23
24

MyRequest.prototype.clearCookie = function (url) {
  if (this.j.store) {
    //memstore
    var context = urlParse(url);
    var host = tough.canonicalDomain(context.hostname);
    this.j.store.removeCookies(host, tough.defaultPath(context.pathname), function () {});
  }
};
fork icon15
star icon41
watch icon2

1
2
3
4
5
6
7
8
9

var fs = require('fs');
var UTIL = require('util');
var Q = require('q');
var TOUGH = require('tough-cookie');
var canonicalDomain = TOUGH.canonicalDomain;
var permuteDomain = TOUGH.permuteDomain;
var permutePath = TOUGH.permutePath;
var LOCKFILE = require('lockfile');
fork icon8
star icon4
watch icon0

+ 3 other calls in file