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 hosted Effect
exposes [Effect, after, map, always, forever, loop, putLine, getLine, sendRequest] 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] generates Effect with [after, map, always, forever, loop]
putLine : Str -> Effect {} putLine : Str -> Effect {}

View File

@ -1,10 +1,19 @@
interface Http interface Http
exposes [ exposes [
Request,
Method,
Header,
Timeout,
ProgressTracking,
Part,
Body,
Response,
Metadata,
Error,
header, header,
emptyBody, emptyBody,
bytesBody, bytesBody,
stringBody, stringBody,
# jsonBody,
multiPartBody, multiPartBody,
stringPart, stringPart,
bytesPart, bytesPart,
@ -13,14 +22,18 @@ interface Http
errorToString, errorToString,
send, send,
] ]
imports [ imports [Effect, InternalTask, Task.{ Task }, InternalHttp]
Effect,
InternalTask, Request : InternalHttp.Request
# Json, Method : InternalHttp.Method
Task.{ Task }, Header : InternalHttp.Header
# Encode.{ Encoding }, Timeout : InternalHttp.Timeout
HttpTypes.{ Request, Method, Header, Timeout, ProgressTracking, Part, Body, Response, Metadata, Error }, ProgressTracking : InternalHttp.ProgressTracking
] Part : InternalHttp.Part
Body : InternalHttp.Body
Response : InternalHttp.Response
Metadata : InternalHttp.Metadata
Error : InternalHttp.Error
defaultRequest : Request defaultRequest : Request
defaultRequest = { defaultRequest = {

View File

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