Fixes error messaging for net-post to be more accurate and bumps version to 1.2.3
This commit is contained in:
parent
52531d3d4c
commit
c778761b58
4
lib.go
4
lib.go
|
@ -2517,7 +2517,7 @@ var stdLibrary = vars{
|
|||
},
|
||||
"net-post": func(a ...expression) expression {
|
||||
if len(a) < 2 {
|
||||
return []expression{false, "'net-post' expects a url string and a string or list of bytes representing the post body/data, too few values were given"}
|
||||
return []expression{false, "'net-post' expects a url string and a string or an open io-handle containing the post body/data, too few values were given"}
|
||||
}
|
||||
u, err := url.Parse(String(a[0], false))
|
||||
if err != nil {
|
||||
|
@ -2593,7 +2593,7 @@ var stdLibrary = vars{
|
|||
}
|
||||
return []expression{true, string(resp)}
|
||||
default:
|
||||
return []expression{false, "'net-post' was given a URL for an unsupported scheme: " + u.Scheme + ". Consider using 'net-conn' instead"}
|
||||
return []expression{false, "'net-post' was given a url for an unsupported scheme: " + u.Scheme + ". Consider using 'net-conn' instead"}
|
||||
}
|
||||
},
|
||||
"net-get": func(a ...expression) expression {
|
||||
|
|
Loading…
Reference in New Issue