【发布时间】:2019-07-11 19:22:30
【问题描述】:
我正在使用下面 cypress 文档中的示例向我的身份验证服务器发出请求。
以下是我的配置,但我收到 400 错误请求。该 url 应该将我带到登录表单并授权用户,然后重定向到回调页面以获取令牌。
我错过了什么吗?
const options = {
method: 'POST',
url: 'https://fakeauthserver.net/Account/Login',
qs: {
redirect_uri: 'http://localhost:9000/login/callback',
client_id: 'webapp',
response_type: 'code',
scope: 'full-access'
},
form: true,
body: {
Username: 'fakeusername@grr.la',
Password: '123456',
button: 'login'
}
};
_.extend(config);
cy.request(config)
【问题讨论】:
标签: api post oauth request cypress