File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -133,4 +133,20 @@ responseHeaders :: Response -> StrMap String
133
133
134
134
Get the response headers as a hash
135
135
136
+ #### ` statusCode `
137
+
138
+ ``` purescript
139
+ statusCode :: Response -> Int
140
+ ```
141
+
142
+ Get the response status code
143
+
144
+ #### ` statusMessage `
145
+
146
+ ``` purescript
147
+ statusMessage :: Response -> String
148
+ ```
149
+
150
+ Get the response status message
151
+
136
152
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ module Node.HTTP.Client
17
17
, responseAsStream
18
18
, httpVersion
19
19
, responseHeaders
20
+ , statusCode
21
+ , statusMessage
20
22
) where
21
23
22
24
import Prelude
@@ -96,3 +98,11 @@ httpVersion = _.httpVersion <<< unsafeCoerce
96
98
-- | Get the response headers as a hash
97
99
responseHeaders :: Response -> StrMap String
98
100
responseHeaders = _.headers <<< unsafeCoerce
101
+
102
+ -- | Get the response status code
103
+ statusCode :: Response -> Int
104
+ statusCode = _.statusCode <<< unsafeCoerce
105
+
106
+ -- | Get the response status message
107
+ statusMessage :: Response -> String
108
+ statusMessage = _.statusMessage <<< unsafeCoerce
You can’t perform that action at this time.
0 commit comments