Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
6
Task/HTTP/LFE/http-1.lfe
Normal file
6
Task/HTTP/LFE/http-1.lfe
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
(: inets start)
|
||||
(case (: httpc request '"http://lfe.github.io")
|
||||
((tuple 'ok result)
|
||||
(: io format '"Result: ~p" (list result)))
|
||||
((tuple 'error reason)
|
||||
(: io format '"Error: ~p~n" (list reason))))
|
||||
13
Task/HTTP/LFE/http-2.lfe
Normal file
13
Task/HTTP/LFE/http-2.lfe
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
(: inets start)
|
||||
(let* ((method 'get)
|
||||
(url '"http://lfe.github.io")
|
||||
(headers ())
|
||||
(request-data (tuple url headers))
|
||||
(http-options ())
|
||||
(request-options (list (tuple 'sync 'false))))
|
||||
(: httpc request method request-data http-options request-options)
|
||||
(receive
|
||||
((tuple 'http (tuple request-id (tuple 'error reason)))
|
||||
(: io format '"Error: ~p~n" (list reason)))
|
||||
((tuple 'http (tuple request-id result))
|
||||
(: io format '"Result: ~p~n" (list result))))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue