Re-export Http types from the Http module itself

This commit is contained in:
Brian Carroll 2022-07-18 23:16:54 +01:00
parent c35318dbfb
commit e1bf4a317a
No known key found for this signature in database
GPG Key ID: 9CF4E3BF9C4722C7
3 changed files with 24 additions and 11 deletions

View File

@ -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 {}

View File

@ -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 = {

View File

@ -1,4 +1,4 @@
interface HttpTypes
interface InternalHttp
exposes [Request, Method, Header, Timeout, ProgressTracking, Part, Body, Response, Metadata, Error]
imports []