shrub/lib/http.hoon

32 lines
702 B
Plaintext
Raw Normal View History

2015-05-07 00:00:06 +03:00
::
2015-06-05 03:27:01 +03:00
:::: /hoon/http/lib
2015-05-07 00:00:06 +03:00
::
::
::
/? 310
!:
|%
2015-09-02 01:20:17 +03:00
++ request
$: domain=(list cord) end-point=path
req-type=$?(%get [%post p=json]) headers=math
queries=quay
==
++ send
|= [ost=bone pour-path=wire params=request]
:^ ost %them pour-path
`(unit hiss)`[~ (request-to-hiss params)]
2015-05-29 02:07:03 +03:00
::
2015-09-02 01:20:17 +03:00
++ request-to-hiss
|= request ^- hiss
=- ~& hiss=- -
:- ^- parsed-url=purl
:+ :+ security=%.y
port=~
host=[%.y [path=domain]]
endpoint=[extensions=~ point=end-point] :: ++pork,
q-strings=queries :: ++quay
?@ req-type
[%get headers ~]
[%post headers ~ (tact (pojo p.req-type))]
2015-05-07 00:00:06 +03:00
--