diff --git a/src/puppy.nim b/src/puppy.nim index 79e89c4..0643205 100644 --- a/src/puppy.nim +++ b/src/puppy.nim @@ -30,7 +30,7 @@ proc fetch*(req: Request): Response {.raises: [PuppyError].} = if req.timeout == 0: req.timeout = 60 - return platform.fetch(req) + return internalFetch(req) proc newRequest*( url: string, diff --git a/src/puppy/platforms/linux/platform.nim b/src/puppy/platforms/linux/platform.nim index ea16abc..11d8926 100644 --- a/src/puppy/platforms/linux/platform.nim +++ b/src/puppy/platforms/linux/platform.nim @@ -15,7 +15,7 @@ type StringWrap = object ## some sort of wrapper to be passed to C. str: string -proc fetch*(req: Request): Response {.raises: [PuppyError].} = +proc internalFetch*(req: Request): Response {.raises: [PuppyError].} = result = Response() {.push stackTrace: off.} diff --git a/src/puppy/platforms/macos/platform.nim b/src/puppy/platforms/macos/platform.nim index 2249343..52344d3 100644 --- a/src/puppy/platforms/macos/platform.nim +++ b/src/puppy/platforms/macos/platform.nim @@ -1,6 +1,6 @@ import macdefs, objc, puppy/common, std/strutils -proc fetch*(req: Request): Response {.raises: [PuppyError].} = +proc internalFetch*(req: Request): Response {.raises: [PuppyError].} = result = Response() autoreleasepool: diff --git a/src/puppy/platforms/win32/platform.nim b/src/puppy/platforms/win32/platform.nim index 914b105..e284e51 100644 --- a/src/puppy/platforms/win32/platform.nim +++ b/src/puppy/platforms/win32/platform.nim @@ -1,6 +1,6 @@ import puppy/common, std/strutils, utils, windefs, zippy -proc fetch*(req: Request): Response {.raises: [PuppyError].} = +proc internalFetch*(req: Request): Response {.raises: [PuppyError].} = result = Response() var hSession, hConnect, hRequest: HINTERNET