diff --git a/src/client/client.v b/src/client/client.v index 7cb6be5d..2bb1ac20 100644 --- a/src/client/client.v +++ b/src/client/client.v @@ -66,5 +66,5 @@ fn (c &Client) send_request_with_body(method Method, url string, params map[s fn (c &Client) send_request_raw_response(method Method, url string, params map[string]string, body string) ?string { res := c.send_request_raw(method, url, params, body)? - return res.text + return res.body } diff --git a/src/web/web.v b/src/web/web.v index f237e246..b053904d 100644 --- a/src/web/web.v +++ b/src/web/web.v @@ -25,12 +25,12 @@ pub const ( http_302 = http.new_response( status: .found - text: '302 Found' + body: '302 Found' header: headers_close ) http_400 = http.new_response( status: .bad_request - text: '400 Bad Request' + body: '400 Bad Request' header: http.new_header( key: .content_type value: 'text/plain' @@ -38,7 +38,7 @@ pub const ( ) http_404 = http.new_response( status: .not_found - text: '404 Not Found' + body: '404 Not Found' header: http.new_header( key: .content_type value: 'text/plain' @@ -46,7 +46,7 @@ pub const ( ) http_500 = http.new_response( status: .internal_server_error - text: '500 Internal Server Error' + body: '500 Internal Server Error' header: http.new_header( key: .content_type value: 'text/plain' @@ -209,7 +209,7 @@ pub fn (mut ctx Context) send_response_to_client(mimetype string, res string) bo mut resp := http.Response{ header: header.join(web.headers_close) - text: res + body: res } resp.set_version(.v1_1) resp.set_status(ctx.status)