API响应是html而不是Json

问题描述 投票:1回答:1

我正在尝试连接到FortiSandbox api,guide here

来自指南的片段:

enter image description here

我的用户名:admin

我的密码:Aa12345!

卷曲:

    curl -X POST \
  https://10.1.1.170/sys/login/user/ \
  -H 'accept: application/json' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: bd3ae694-f400-c723-8955-bfc4e96c8147' \
  -d '{
  "method": "exec",
  "params": [{
    "url": "/sys/login/user/",
    "data": [{
      "user": "admin",
      "passwd": "Aa12345!"
    }]
  }],
  "id": 1,
  "ver": "2.0"
}'

响应是HTML而不是Json,qazxsw poi

PLZ给绝望的人提供建议一些HTML响应:

here full HTML content response
json api curl postman
1个回答
1
投票
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>FortiSandbox - Please login</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        .
        .
        .
© www.soinside.com 2019 - 2024. All rights reserved.