0

I have the zabbix server .../zabbix/screens.php with screen. How i can get html page from this url? (need authentufication). Authentification token i have, but no way to get correct html page. By this useEffect hook i get auth token

const headers = {
  "headers": {
    "Content-Type": "application/json",
    " Accept": "application/json, text/plain, */*",
  }
}

const postData = {
  "jsonrpc": "2.0",
  "method": "user.login",
  "params": {
    "user": ".....",
    "password": "....",
  },
  "id": 1}

export const CI = () => {
  
  useEffect(() => {
    const fetchData = async () => {
      try {
        const response = await axios.post(".../zabbix/api_jsonrpc.php", postData, headers);
        console.log(response.data)
      } catch(e) {
        console.log("Error")
      }}
    fetchData();
  },[])

  return (
    <div style={{height: "100%"}}>
    </div>
  )
}

What request should I send next to get the html page at the given url?

Heliodor
  • 115
  • 6

0 Answers0