1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

net.http: Response.text -> Response.body (#14478)

This commit is contained in:
Hunam
2022-05-29 19:27:18 +02:00
committed by GitHub
parent 2c5febe25e
commit 78d1b7f4ef
19 changed files with 65 additions and 74 deletions

View File

@@ -161,7 +161,7 @@ pub fn fetch(config FetchConfig) ?Response {
// get_text sends a GET HTTP request to the URL and returns the text content of the response
pub fn get_text(url string) string {
resp := fetch(url: url, method: .get) or { return '' }
return resp.text
return resp.body
}
// url_encode_form_data converts mapped data to an URL encoded string