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

net.http: fix request_test.v

This commit is contained in:
Alexander Medvednikov 2021-09-11 06:16:00 +03:00
parent f9eb14d914
commit 90e04d03b2
2 changed files with 4 additions and 3 deletions

View File

@ -244,7 +244,7 @@ fn parse_form(body string) map[string]string {
// ...
}
struct FileData {
pub struct FileData {
pub:
filename string
content_type string

View File

@ -1,5 +1,6 @@
module vweb
import net.http
import io
struct StringReader {
@ -114,9 +115,9 @@ Content-Disposition: form-data; name=\"${names[1]}\"
${contents[1]}
--------------------------$boundary--
"
form, files := parse_multipart_form(data, boundary)
form, files := http.parse_multipart_form(data, boundary)
assert files == {
names[0]: [FileData{
names[0]: [http.FileData{
filename: file
content_type: ct
data: contents[0]