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

net: update new_request (#17618)

This commit is contained in:
Brandon 2023-03-17 22:17:22 +01:00 committed by GitHub
parent 268cee82fc
commit aee76c5819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ pub mut:
// new_request creates a new Request given the request `method`, `url_`, and // new_request creates a new Request given the request `method`, `url_`, and
// `data`. // `data`.
pub fn new_request(method Method, url_ string, data string) ?Request { pub fn new_request(method Method, url_ string, data string) Request {
url := if method == .get && !url_.contains('?') { url_ + '?' + data } else { url_ } url := if method == .get && !url_.contains('?') { url_ + '?' + data } else { url_ }
// println('new req() method=$method url="$url" dta="$data"') // println('new req() method=$method url="$url" dta="$data"')
return Request{ return Request{