summary refs log tree commit diff stats
path: root/lib/pure/httpcore.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/httpcore.nim')
-rw-r--r--lib/pure/httpcore.nim9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/pure/httpcore.nim b/lib/pure/httpcore.nim
index 8c679c017..8916aa17d 100644
--- a/lib/pure/httpcore.nim
+++ b/lib/pure/httpcore.nim
@@ -290,7 +290,14 @@ proc `$`*(code: HttpCode): string =
 
 proc `==`*(a, b: HttpCode): bool {.borrow.}
 
-proc `==`*(rawCode: string, code: HttpCode): bool =
+proc `==`*(rawCode: string, code: HttpCode): bool
+          {.deprecated: "Deprecated since v1.2; use rawCode == $code instead".} =
+  ## Compare the string form of the status code with a HttpCode
+  ##
+  ## **Note**: According to HTTP/1.1 specification, the reason phrase is
+  ##           optional and should be ignored by the client, making this
+  ##           proc only suitable for comparing the ``HttpCode`` against the
+  ##           string form of itself.
   return cmpIgnoreCase(rawCode, $code) == 0
 
 proc is2xx*(code: HttpCode): bool =