Skip to main content

HTTP_BINARY

Deprecated version

This document refers to a deprecated version of the RQL programming language.

Please go here for documentation related to the latest supported version.

HTTP_BINARY behaves similar to HTTP but the return data is binary.

Syntax
HTTP_BINARY(url: string,
method: string := "get",
body_string: string nullable := null,
body_binary: binary nullable := null,
token: string nullable := null,
client_id: string nullable := null,
client_secret: string nullable := null,
token_url: string nullable := null,
renew_token_use_basic_auth: bool nullable := null,
username: string nullable := null,
password: string nullable := null,
args: collection(tuple(string, string)) := [],
headers: collection(tuple(string, string)) := [],
expected_status: collection(int) nullable := [200, 201, 202, 203, 204, 205, 206])

Example
request := HTTP_BINARY("http://www.server.users",
method := "POST",
args := [("name", "john")],
headers := [("Authorization", "Bearer token"), ("Accept", "application/json")]
);
decoded_data := decode_string(request.data, "utf-8");
select * from parse_json[collection(record(name: string, age: int))](decoded_data)