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:
@ -16,7 +16,7 @@ fn worker_fetch(p &pool.PoolProcessor, cursor int, worker_id int) voidptr {
|
||||
println('failed to fetch data from /v0/item/${id}.json')
|
||||
return pool.no_result
|
||||
}
|
||||
story := json.decode(Story, resp.text) or {
|
||||
story := json.decode(Story, resp.body) or {
|
||||
println('failed to decode a story')
|
||||
return pool.no_result
|
||||
}
|
||||
@ -30,7 +30,7 @@ fn main() {
|
||||
println('failed to fetch data from /v0/topstories.json')
|
||||
return
|
||||
}
|
||||
ids := json.decode([]int, resp.text) or {
|
||||
ids := json.decode([]int, resp.body) or {
|
||||
println('failed to decode topstories.json')
|
||||
return
|
||||
}#[0..10]
|
||||
|
Reference in New Issue
Block a user