From 31b51358777fb3316b16e2704b95657108967e34 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 25 Aug 2022 21:13:26 +0200 Subject: [PATCH] Fix default argument for the binding of WebServerRequest::send_redirect. --- modules/web/http/web_server_request.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/web/http/web_server_request.cpp b/modules/web/http/web_server_request.cpp index 2bfa12a71..a07307676 100644 --- a/modules/web/http/web_server_request.cpp +++ b/modules/web/http/web_server_request.cpp @@ -546,7 +546,7 @@ void WebServerRequest::_bind_methods() { ClassDB::bind_method(D_METHOD("set_status_code", "val"), &WebServerRequest::set_status_code); ADD_PROPERTY(PropertyInfo(Variant::INT, "status_code"), "set_status_code", "get_status_code"); - ClassDB::bind_method(D_METHOD("send_redirect", "location", "status_code "), &WebServerRequest::send_redirect); + ClassDB::bind_method(D_METHOD("send_redirect", "location", "status_code"), &WebServerRequest::send_redirect, HTTPServerEnums::HTTP_STATUS_CODE_302_FOUND); ClassDB::bind_method(D_METHOD("compile_body"), &WebServerRequest::compile_body); ClassDB::bind_method(D_METHOD("compile_and_send_body"), &WebServerRequest::compile_and_send_body); ClassDB::bind_method(D_METHOD("send"), &WebServerRequest::send);