mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-19 12:51:51 +03:00
30 lines
771 B
Plaintext
30 lines
771 B
Plaintext
|
::
|
||
|
:::: /hook/core/sole/lib;
|
||
|
::
|
||
|
::
|
||
|
::
|
||
|
/? 310
|
||
|
!:
|
||
|
|%
|
||
|
++ httpreq
|
||
|
|= $: ost=bone pour-path=wire
|
||
|
domain=(list cord) end-point=path
|
||
|
req-type=$?(%get [%post json]) headers=math
|
||
|
queries=quay
|
||
|
==
|
||
|
=+ ^- parsed-url=purl
|
||
|
:+ :+ security=%.y
|
||
|
port=~
|
||
|
host=[%.y [path=domain]]
|
||
|
endpoint=[extensions=~ point=end-point] :: ++pork,
|
||
|
q-strings=queries :: ++quay
|
||
|
=+ ^- request=hiss :: cast to hiss
|
||
|
:- parsed-url
|
||
|
?@ req-type
|
||
|
[%get headers ~]
|
||
|
[%post headers ~ (tact (pojo +.req-type))]
|
||
|
:^ ost %pass pour-path
|
||
|
:+ %e %them
|
||
|
`(unit hiss)`[~ request]
|
||
|
--
|