File: http2.nasl

package info (click to toggle)
openvas-scanner 23.35.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 22,416 kB
  • sloc: ansic: 41,615; xml: 6,251; pascal: 3,723; yacc: 1,250; sh: 1,068; makefile: 333; sql: 273; javascript: 12
file content (20 lines) | stat: -rw-r--r-- 559 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# SPDX-FileCopyrightText: 2023 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

display("Starting...");
h = http2_handle();
display(h);

i = http2_set_custom_header(handle: h, header_item: "X-API-KEY: changeme");
i = http2_set_custom_header(handle: h, header_item: "content-type: application/json");

# valid for openvasd
r = http2_get(handle:h, port:3000, item:"/health/ready", schema:"https");
display("response: ", r);

rc = http2_get_response_code(handle:h);

display("return code: ", rc);

http2_close_handle(h);