Http_SendCustomRequest


Sends a custom HTTP request.

Syntax

C++
Python
 
def Http_SendCustomRequest(
	inUrl: str,
	inUrlParameters: list[str],
	inUrlParametersData: list[str],
	inHeaders: list[str],
	inHeadersData: list[str],
	inData: ByteBuffer,
	/,
	*,
	inMethod: HTTPRequestMethod = HTTPRequestMethod.GET,
	inTimeout: int = 60,
	inAllowUntrusted: bool = False,
	inCaCertFile: str | None = None
)
-> (
	outAnswer: ByteBuffer | None,
	outResponseCode: int
)

Parameters

Name Type Range Default Description
Input value inMethod HTTPRequestMethod HTTPRequestMethod.GET Method of the request.
Input value inUrl str URL of the request.
Input value inUrlParameters list[str] URL parameters. They will be automatically encoded.
Input value inUrlParametersData list[str] URL parameters. They will be automatically encoded.
Input value inHeaders list[str] Request headers to send. They will be automatically encoded.
Input value inHeadersData list[str] Request headers to send. They will be automatically encoded.
Input value inData ByteBuffer Binary data to be sent.
Input value inTimeout int 0 - 60 Request timeout in seconds.
Input value inAllowUntrusted bool False Whether or not to allow untrusted SSL certificates.
Input value inCaCertFile str | None None File holding one or more certificates to verify the peer with.
Output value outAnswer ByteBuffer | None Answer data.
Output value outResponseCode int Answer code. Typically 200 for OK.