Skip to content

Commit a44ab69

Browse files
author
Connor Prussin
committed
Rename HTTPS to Secure
1 parent f83eeba commit a44ab69

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed
File renamed without changes.

src/Node/HTTP/HTTPS.purs renamed to src/Node/HTTP/Secure.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- | This module defines low-level bindings to the Node HTTPS module.
22

3-
module Node.HTTP.HTTPS
3+
module Node.HTTP.Secure
44
( createServer
55

66
, SSLOptions

test/Main.purs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import Control.Monad.Eff.Console (CONSOLE, log, logShow)
77

88
import Data.Foldable (foldMap)
99
import Data.Maybe (Maybe(..))
10-
import Data.Options (Options, (:=))
10+
import Data.Options (Options, options, (:=))
1111

1212
import Node.Encoding (Encoding(..))
1313
import Node.HTTP (HTTP, Request, Response, listen, createServer, setHeader, requestMethod, requestURL, responseAsStream, requestAsStream, setStatusCode)
1414
import Node.HTTP.Client as Client
15-
import Node.HTTP.HTTPS as HTTPS
15+
import Node.HTTP.Secure as HTTPS
1616
import Node.Stream (Writable, end, pipe, writeString)
1717

1818
import Partial.Unsafe (unsafeCrashWith)
@@ -141,12 +141,12 @@ simpleReq uri = do
141141
end (Client.requestAsStream req) (pure unit)
142142

143143
complexReq :: forall eff. Options Client.RequestOptions -> Eff (console :: CONSOLE, http :: HTTP | eff) Unit
144-
complexReq options = do
145-
log $ opts.method <> " " <> opts.hostname <> opts.path <> ":"
146-
req <- Client.request options logResponse
144+
complexReq opts = do
145+
log $ optsR.method <> " " <> optsR.protocol <> "//" <> optsR.hostname <> ":" <> optsR.port <> optsR.path <> ":"
146+
req <- Client.request opts logResponse
147147
end (Client.requestAsStream req) (pure unit)
148148
where
149-
opts = unsafeCoerce options
149+
optsR = unsafeCoerce $ options opts
150150

151151
logResponse :: forall eff. Client.Response -> Eff (console :: CONSOLE, http :: HTTP | eff) Unit
152152
logResponse response = void do

0 commit comments

Comments
 (0)