mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2025-03-10 17:29:10 +00:00
🚧
This commit is contained in:
parent
3919f17a99
commit
b4f7e16017
@ -26,5 +26,14 @@ func (r *Request) HTTPRequest() (*http.Request, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
headersIt := rValue.Get("headers").Call("entries")
|
||||
for {
|
||||
v := headersIt.Call("next")
|
||||
if v.Get("done").Bool() {
|
||||
break
|
||||
}
|
||||
req.Header.Set(v.Index(0).String(), v.Index(1).String())
|
||||
}
|
||||
|
||||
return req, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user