dm_rpc_post_type Function

public function dm_rpc_post_type(request, response, type, url, username, password, user_agent, compression) result(rc)

Sends a single derived type in Namelist format to a given URL, with optional authentication and compression. The URL has to be the API endpoint that accepts HTTP POST requests.

The dummy argument type may be of derived type beat_type, log_type, node_type, observ_type, sensor_type, or target_type. The function returns E_TYPE on any other type.

The function returns the following error codes:

  • E_INVALID if compression type is invalid.
  • E_RPC if request failed.
  • E_TYPE if type is unsupported.
  • E_ZLIB if zlib libray call failed.
  • E_ZSTD if zstd libray call failed.

Arguments

Type IntentOptional Attributes Name
type(rpc_request_type), intent(inout) :: request

RPC request type.

type(rpc_response_type), intent(out) :: response

RPC response type.

class(*), intent(inout) :: type

Derived type.

character(len=*), intent(in), optional :: url

URL of RPC API (may include port).

character(len=*), intent(in), optional :: username

HTTP Basic Auth user name.

character(len=*), intent(in), optional :: password

HTTP Basic Auth password.

character(len=*), intent(in), optional :: user_agent

HTTP User Agent.

integer, intent(in), optional :: compression

Deflate or Zstandard compression of payload for POST requests (Z_TYPE_*).

Return Value integer


Calls

proc~~dm_rpc_post_type~~CallsGraph proc~dm_rpc_post_type dm_rpc_post_type proc~dm_is_error dm_is_error proc~dm_rpc_post_type->proc~dm_is_error proc~dm_z_compress_type dm_z_compress_type proc~dm_rpc_post_type->proc~dm_z_compress_type proc~dm_z_type_is_valid dm_z_type_is_valid proc~dm_rpc_post_type->proc~dm_z_type_is_valid proc~dm_z_compress_type->proc~dm_is_error interface~dm_nml_from dm_nml_from proc~dm_z_compress_type->interface~dm_nml_from interface~dm_z_is_valid dm_z_is_valid proc~dm_z_compress_type->interface~dm_z_is_valid interface~dm_zstd_compress dm_zstd_compress proc~dm_z_compress_type->interface~dm_zstd_compress proc~dm_zlib_compress dm_zlib_compress proc~dm_z_compress_type->proc~dm_zlib_compress interface~dm_z_is_valid->proc~dm_z_type_is_valid compress compress proc~dm_zlib_compress->compress compress_bound compress_bound proc~dm_zlib_compress->compress_bound

Called by

proc~~dm_rpc_post_type~~CalledByGraph proc~dm_rpc_post_type dm_rpc_post_type interface~dm_rpc_post dm_rpc_post interface~dm_rpc_post->proc~dm_rpc_post_type