mirror of
https://github.com/vlang/v.git
synced 2025-09-16 07:52:32 +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:
parent
ddd83c2108
commit
aeda48d94e
2 changed files with 182 additions and 44 deletions
|
@ -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 == '' {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue