cookie-pass
pass a cookie information from response(http.incomingMessage
) to request option.
synopsis
var cookiepass = var http = var url = var qs = var requestData = qsvar login = urlloginmethod = 'POST'loginport = 80loginheaders = 'content-type': 'application/x-www-form-urlencoded' 'content-length': Buffer http
exports
cookiepass(http.incomingMessage, requestOption)
requestOption is request object
or request url string
.
var cookiepass = var cookie =
return a new cookie object (with .pass()
and .merge()
) oprating on http.request
.
methods
cookie.pass({request_option})
a cookie object pass cookie informations to request option
.
(add request_option.headers.cookie
.)
return cookie string.
cookie.merge(http.incomingMessage, requestOption)
a cookie object get cookie informations from http.incomingMessage.headers['sec-cookie']
and parse it.
license
MIT