mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net.http: fix a bug with ? in new_request
This commit is contained in:
parent
00433ba460
commit
577fedfce1
@ -30,7 +30,7 @@ pub mut:
|
|||||||
}
|
}
|
||||||
|
|
||||||
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_ + '?' + 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{
|
||||||
method: method
|
method: method
|
||||||
|
Loading…
Reference in New Issue
Block a user