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:
@ -596,7 +596,7 @@ fn get_all_modules() []string {
|
||||
println('Failed to search vpm.vlang.io. Status code: $r.status_code')
|
||||
exit(1)
|
||||
}
|
||||
s := r.text
|
||||
s := r.body
|
||||
mut read_len := 0
|
||||
mut modules := []string{}
|
||||
for read_len < s.len {
|
||||
@ -733,7 +733,7 @@ fn get_module_meta_info(name string) ?Mod {
|
||||
errors << 'Error details: $err'
|
||||
continue
|
||||
}
|
||||
if r.status_code == 404 || r.text.trim_space() == '404' {
|
||||
if r.status_code == 404 || r.body.trim_space() == '404' {
|
||||
errors << 'Skipping module "$name", since "$server_url" reported that "$name" does not exist.'
|
||||
continue
|
||||
}
|
||||
@ -741,7 +741,7 @@ fn get_module_meta_info(name string) ?Mod {
|
||||
errors << 'Skipping module "$name", since "$server_url" responded with $r.status_code http status code. Please try again later.'
|
||||
continue
|
||||
}
|
||||
s := r.text
|
||||
s := r.body
|
||||
if s.len > 0 && s[0] != `{` {
|
||||
errors << 'Invalid json data'
|
||||
errors << s.trim_space().limit(100) + ' ...'
|
||||
|
Reference in New Issue
Block a user