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
133133
134134Get the response headers as a hash
135135
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+
136152
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ module Node.HTTP.Client
1717 , responseAsStream
1818 , httpVersion
1919 , responseHeaders
20+ , statusCode
21+ , statusMessage
2022 ) where
2123
2224import Prelude
@@ -96,3 +98,11 @@ httpVersion = _.httpVersion <<< unsafeCoerce
9698-- | Get the response headers as a hash
9799responseHeaders :: Response -> StrMap String
98100responseHeaders = _.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