diff --git a/presto/client.nim b/presto/client.nim index 96c3162..78a4c53 100644 --- a/presto/client.nim +++ b/presto/client.nim @@ -8,7 +8,7 @@ # MIT license (LICENSE-MIT) import std/[macros, options, uri, sequtils] import chronos, chronos/apps/http/[httpcommon, httptable, httpclient] -import chronicles +import chronicles except error import httputils, stew/base10 import segpath, common, macrocommon, agent export httpclient, httptable, httpcommon, options, agent, httputils @@ -19,9 +19,11 @@ template meth*(v: HttpMethod) {.pragma.} type RestClient* = object of RootObj session: HttpSessionRef - address: HttpAddress + address*: HttpAddress agent: string + RestClientRef* = ref RestClient + RestPlainResponse* = object status*: int contentType*: string @@ -40,8 +42,6 @@ type RestReturnKind {.pure.} = enum Status, PlainResponse, GenericResponse, Value - RestClientRef* = ref RestClient - RestDefect* = object of Defect RestError* = object of CatchableError RestEncodingError* = object of RestError