mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-15 02:48:06 +03:00
34 lines
716 B
Plaintext
34 lines
716 B
Plaintext
::
|
|
:::: /hoon/http/lib
|
|
::
|
|
::
|
|
::
|
|
/? 310
|
|
!:
|
|
|%
|
|
++ 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)]
|
|
::
|
|
++ 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))]
|
|
--
|