Procs
proc fetch(url: string; headers = emptyHttpHeaders()): string {. ...raises: [PuppyError, CatchableError], tags: [], forbids: [].}
- Simple fetch that directly returns the GET response body. Raises an exception if anything goes wrong or if the response code is not 200. See get, post, put etc for similar calls that return a response object. Source Edit
proc newRequest(url: string; verb = "get"; headers = emptyHttpHeaders(); timeout: float32 = 60.0): Request {....raises: [CatchableError], tags: [], forbids: [].}
- Allocates a new request object with defaults. Source Edit