mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-10 18:08:55 +03:00
Re-export Http types from the Http module itself
This commit is contained in:
parent
c35318dbfb
commit
e1bf4a317a
@ -1,6 +1,6 @@
|
||||
hosted Effect
|
||||
exposes [Effect, after, map, always, forever, loop, putLine, getLine, sendRequest]
|
||||
imports [HttpTypes.{ Request, Response }]
|
||||
imports [InternalHttp.{ Request, Response }]
|
||||
generates Effect with [after, map, always, forever, loop]
|
||||
|
||||
putLine : Str -> Effect {}
|
||||
|
@ -1,10 +1,19 @@
|
||||
interface Http
|
||||
exposes [
|
||||
Request,
|
||||
Method,
|
||||
Header,
|
||||
Timeout,
|
||||
ProgressTracking,
|
||||
Part,
|
||||
Body,
|
||||
Response,
|
||||
Metadata,
|
||||
Error,
|
||||
header,
|
||||
emptyBody,
|
||||
bytesBody,
|
||||
stringBody,
|
||||
# jsonBody,
|
||||
multiPartBody,
|
||||
stringPart,
|
||||
bytesPart,
|
||||
@ -13,14 +22,18 @@ interface Http
|
||||
errorToString,
|
||||
send,
|
||||
]
|
||||
imports [
|
||||
Effect,
|
||||
InternalTask,
|
||||
# Json,
|
||||
Task.{ Task },
|
||||
# Encode.{ Encoding },
|
||||
HttpTypes.{ Request, Method, Header, Timeout, ProgressTracking, Part, Body, Response, Metadata, Error },
|
||||
]
|
||||
imports [Effect, InternalTask, Task.{ Task }, InternalHttp]
|
||||
|
||||
Request : InternalHttp.Request
|
||||
Method : InternalHttp.Method
|
||||
Header : InternalHttp.Header
|
||||
Timeout : InternalHttp.Timeout
|
||||
ProgressTracking : InternalHttp.ProgressTracking
|
||||
Part : InternalHttp.Part
|
||||
Body : InternalHttp.Body
|
||||
Response : InternalHttp.Response
|
||||
Metadata : InternalHttp.Metadata
|
||||
Error : InternalHttp.Error
|
||||
|
||||
defaultRequest : Request
|
||||
defaultRequest = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
interface HttpTypes
|
||||
interface InternalHttp
|
||||
exposes [Request, Method, Header, Timeout, ProgressTracking, Part, Body, Response, Metadata, Error]
|
||||
imports []
|
||||
|
Loading…
Reference in New Issue
Block a user