OpenVAS Scanner 23.23.1
nasl_http2.h File Reference
#include "nasl_lex_ctxt.h"

Go to the source code of this file.

Functions

tree_cellnasl_http2_handle (lex_ctxt *)
 Creates a handle for http requests.
tree_cellnasl_http2_close_handle (lex_ctxt *)
 Close a handle for http requests previously initialized.
tree_cellnasl_http2_get_response_code (lex_ctxt *)
 Get the http response code after performing a HTTP request.
tree_cellnasl_http2_set_custom_header (lex_ctxt *)
 Set a custom header element in the header.
tree_cellnasl_http2_get (lex_ctxt *)
 Wrapper function for GET request. See @_http2_req.
tree_cellnasl_http2_head (lex_ctxt *)
 Wrapper function for HEAD request. See @_http2_req.
tree_cellnasl_http2_post (lex_ctxt *)
 Wrapper function for POST request. See @_http2_req.
tree_cellnasl_http2_delete (lex_ctxt *)
 Wrapper function for DELETE request. See @_http2_req.
tree_cellnasl_http2_put (lex_ctxt *)
 Wrapper function for PUT request. See @_http2_req.

Function Documentation

◆ nasl_http2_close_handle()

tree_cell * nasl_http2_close_handle ( lex_ctxt * lexic)

Close a handle for http requests previously initialized.

NASL Function: http2_handle\n
NASL Named Parameters:\n
  • handle The handle identifier for the handle to be closed
NASL Returns:\n O on success, -1 on error
Parameters
[in]lexicLexical context of NASL interpreter.
Returns
The function returns a tree-cell with a integer. O on success, -1 on error.

◆ nasl_http2_delete()

tree_cell * nasl_http2_delete ( lex_ctxt * lexic)

Wrapper function for DELETE request. See @_http2_req.

◆ nasl_http2_get()

tree_cell * nasl_http2_get ( lex_ctxt * lexic)

Wrapper function for GET request. See @_http2_req.

◆ nasl_http2_get_response_code()

tree_cell * nasl_http2_get_response_code ( lex_ctxt * lexic)

Get the http response code after performing a HTTP request.

NASL Named Parameters:\n
  • handle The handle identifier
NASL Returns:\n http code or 0 if not set. NULL on error
Parameters
[in]lexicLexical context of NASL interpreter.
Returns
On success the function returns a tree-cell with and integer representing the http code response. Null on error.

◆ nasl_http2_handle()

tree_cell * nasl_http2_handle ( lex_ctxt * lexic)

Creates a handle for http requests.

NASL Function: http2_handle\n
NASL Returns:\n Handle identifier. Null on error.
Parameters
[in]lexicLexical context of NASL interpreter.
Returns
On success the function returns a tree-cell with the handle identifier. Null on error.

◆ nasl_http2_head()

tree_cell * nasl_http2_head ( lex_ctxt * lexic)

Wrapper function for HEAD request. See @_http2_req.

◆ nasl_http2_post()

tree_cell * nasl_http2_post ( lex_ctxt * lexic)

Wrapper function for POST request. See @_http2_req.

◆ nasl_http2_put()

tree_cell * nasl_http2_put ( lex_ctxt * lexic)

Wrapper function for PUT request. See @_http2_req.

◆ nasl_http2_set_custom_header()

tree_cell * nasl_http2_set_custom_header ( lex_ctxt * lexic)

Set a custom header element in the header.

NASL Named Parameters:\n
  • handle The handle identifier
  • header_item A string to add to the header
NASL Returns:\n 0 on success. NULL on error
Parameters
[in]lexicLexical context of NASL interpreter.
Returns
On success the function returns a tree-cell integer 0 on success. Null on error.