mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Improve redbean fetch() (#460)
* Updated Fetch to return `nil,error` on errors * Fix localhost connect when only IP address is specified
This commit is contained in:
parent
853b6c3864
commit
059fe22ea3
2 changed files with 35 additions and 42 deletions
|
@ -722,7 +722,8 @@ FUNCTIONS
|
|||
This function is not available in unsecure mode.
|
||||
|
||||
Fetch(url:str[,body:str|{method=value:str,body=value:str,headers=table,...}])
|
||||
→ status:int,{header:str=value:str,...},body:str
|
||||
├─→ status:int, {header:str=value:str,...}, body:str
|
||||
└─→ nil, error:str
|
||||
Sends an HTTP/HTTPS request to the specified URL. If only the URL is
|
||||
provided, then a GET request is sent. If both URL and body parameters
|
||||
are specified, then a POST request is sent. If any other method needs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue