现在不少网站有些接口是需要登录后才可以调用的,
怎么才能登录上后直接请求接口呢?而不是把token什么的挪到postman

登录后打开console窗口,勾选保留日志
登录后新打开一个标签页F12 控制台,console提交后,在看网络请求response

1、chrome post body为空时

fetch('url', { 'method': 'POST'})
注意url就是真实请求的地址

2、chrome post 有数据提交

fetch(new Request('url',{
method:'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body:'{xxx}'}))