1
0
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:
Delyan Angelov
2020-01-03 23:07:58 +02:00
committed by Alexander Medvednikov
parent ddd83c2108
commit aeda48d94e
2 changed files with 182 additions and 44 deletions

View File

@ -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 == '' {