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

http: use Header struct for headers (#9462)

This commit is contained in:
Miccah
2021-04-09 11:17:33 -05:00
committed by GitHub
parent 50f59674ce
commit 5eb67ccd94
8 changed files with 91 additions and 144 deletions

View File

@@ -77,12 +77,12 @@ fn test_http_fetch_with_params() {
}
}
fn test_http_fetch_with_headers() {
fn test_http_fetch_with_headers() ? {
$if !network ? { return }
mut header := new_header()
header.add_custom('Test-Header', 'hello world') ?
responses := http_fetch_mock([], {
headers: {
'Test-Header': 'hello world'
}
header: header
}) or {
panic(err)
}