NodeJS和HTTP客户端 - 是否支持cookie? [英] NodeJS and HTTP Client - Are cookies supported?

查看:103
本文介绍了NodeJS和HTTP客户端 - 是否支持cookie?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

NodeJS 是一个很棒的工具,速度极快。



我想知道HTTPClient是否支持 cookies ,以及是否可用于模拟基本的浏览器行为






非常感谢帮助! =)






编辑:



<找到了这个: node-httpclient (似乎很有用!) 不工作!

解决方案

只需从 Set-Cookie获取Cookie 响应标头中的param,并将其发送回未来的请求。不应该很难。


NodeJS is a fantastic tool and blazing fast.

I'm wondering if HTTPClient supports cookies and if can be used in order to simulate very basic browser behaviour!


Help would be very much appreciated! =)


EDIT:

Found this: node-httpclient (seems useful!) not working!

解决方案

Just get cookies from Set-Cookie param in response headers and send them back with future requests. Should not be hard.

这篇关于NodeJS和HTTP客户端 - 是否支持cookie?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆