aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/world/net/http/client.lux
blob: 6532855145a68f01d8054daf74347be603b57041 (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
(.using
 [library
  [lux (.except)
   ["$" documentation (.only documentation:)]
   ["@" target]
   [control
    ["<>" parser
     ["<[0]>" code]]]
   [data
    ["[0]" text (.only \n)
     ["%" \\format (.only format)]]]
   [macro
    ["[0]" template]]]]
 [\\library
  ["[0]" /]])

(documentation: (/.Client !)
  "A HTTP client capable of issuing requests to a HTTP server.")

(with_template [<name>]
  [(documentation: <name>
     (format "A " (text.upper_cased (template.text [<name>])) " request."))]

  [/.post]
  [/.get]
  [/.put]
  [/.patch]
  [/.delete]
  [/.head]
  [/.connect]
  [/.options]
  [/.trace]
  )

(.def .public documentation
  (.List $.Module)
  (`` (`` ($.module /._
                    ""
                    [..Client
                     ..post
                     ..get
                     ..put
                     ..patch
                     ..delete
                     ..head
                     ..connect
                     ..options
                     ..trace
                     ($.default /.async)
                     ($.default /.headers)
                     (~~ (for @.jvm (~~ (these ($.default /.default)))
                              (~~ (these))))]
                    []))))