From c31ce5be023d98ec855d47f2a1c7195913be2fb9 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Fri, 24 Jun 2022 12:05:21 +0800 Subject: [PATCH] Make code example in HTTPRequest classref working --- doc/classes/HTTPRequest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 2c7f20ef955..eec21a65f3e 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -23,7 +23,7 @@ # Perform a POST request. The URL below returns JSON as of writing. # Note: Don't make simultaneous requests using a single HTTPRequest node. # The snippet below is provided for reference only. - var body = {"name": "Godette"} + var body = to_json({"name": "Godette"}) error = http_request.request("https://httpbin.org/post", [], true, HTTPClient.METHOD_POST, body) if error != OK: push_error("An error occurred in the HTTP request.")