Zum Inhalt

GetWebResponsePacket (Opus Funktion)

Beschreibung

Gibt den angeforderten Inhalt zurück.

Assembles the individual components of an HTTP response into a raw packet blob.

Argumente

Name

Typ

Beschreibung

Headers

[string]

list of raw header lines to include in the response

Keys

[string]

list of header field names (key–value pairs)

Values

[string]

list of header field values corresponding to Keys

Protocol

string

HTTP protocol version string (e.g. "HTTP/1.1")

ErrorCode

string

HTTP status code (e.g. "200", "404")

ErrorText

string

HTTP status text (e.g. "OK", "Not Found")

Data

blob

response body content as a blob

Rückgabewert blob

the assembled raw HTTP response packet

Beispiel

WebRequestAnswer = GetWebResponsePacket([""],
["Server","Content-Type","Content-Length"],["SMT School Professional","text/JSON; charset=UTF-8",GetSize(WebRequestAnswer)],
"HTTP/1.1",Li_AnswerCode,GetHttpCode(Li_AnswerCode),WebRequestAnswer);

Siehe auch