aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/world/net/http.lux
blob: d063d75aca882346bed88cd725e7d79ce8f9dccc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
(.module:
  [lux #*
   [control
    [concurrency
     [promise (#+ Promise)]
     [frp (#+ Channel)]]
    [security
     [integrity (#+ Dirty)]]]
   [data
    [format
     [context (#+ Context)]]]
   [world
    [binary (#+ Binary)]]]
  [// (#+ URL)])

(type: #export Version Text)

(type: #export Method
  #Post
  #Get
  #Put
  #Patch
  #Delete
  #Head
  #Connect
  #Options
  #Trace)

(type: #export Port Nat)

(type: #export Status Nat)

(type: #export Header
  (-> Context Context))

(type: #export Data
  Binary)

(type: #export Body
  (Channel Data))

(type: #export URI
  Text)

(type: #export Scheme
  #HTTP
  #HTTPS)

(type: #export Address
  {#port Port
   #host Text})

(type: #export Identification
  {#local  Address
   #remote Address})

(type: #export Protocol
  {#version Version
   #scheme  Scheme})

(type: #export Resource
  {#method Method
   #uri    URI})

(type: #export Message
  {#headers Context
   #body    Body})

(type: #export Request
  [Identification Protocol Resource Message])

(type: #export Response
  [Status Message])

(type: #export Server
  (-> (Dirty Request) (Promise Response)))