native

ezhttp_option_set_body_from_json

Syntax

native bool:ezhttp_option_set_body_from_json(EzHttpOptions:options_id, EzJSON:json, bool:pretty = false);

Description

Copies serialized string to the requests body.

Parameters

options_id Options identifier created via ezhttp_create_options().
json EzJSON handle.
pretty True to format pretty JSON string, false to not.

Note

Needs to be freed using ezjson_free() native.

Return

True if serialization was successful, false otherwise.

Error

If passed handle is not a valid value. If passed options_id is not exists.