mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vpm: add support for other VCS for modules, like hg
Add ability to pass flags to vpm. Implement -help , -verbose and -server-url , to enable easier diagnostics and testing with a local server.
This commit is contained in:

committed by
Alexander Medvednikov

parent
ddd83c2108
commit
aeda48d94e
@ -54,6 +54,16 @@ pub fn post(url, data string) ?Response {
|
||||
return res
|
||||
}
|
||||
|
||||
pub fn head(url string) ?Response {
|
||||
req := new_request('HEAD', url, '') or {
|
||||
return error(err)
|
||||
}
|
||||
res := req.do() or {
|
||||
return error(err)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// new_request creates a new HTTP request
|
||||
pub fn new_request(typ, _url, _data string) ?Request {
|
||||
if _url == '' {
|
||||
|
Reference in New Issue
Block a user