mirror of
https://github.com/urbit/shrub.git
synced 2025-01-02 01:25:55 +03:00
remove ++epur:url:eyre convenience interface
This commit is contained in:
parent
568cfcbf2e
commit
3f904b4f90
@ -6,7 +6,7 @@
|
||||
|_ {{^ ^ ost/@ ^} $~}
|
||||
++ poke |*(a/{mark *} :_(+> [ost %hiss / `~ %wain a]~))
|
||||
::++ poke-purl |=(a/purl :_(+> [ost %hiss / %wain %purl a]~))
|
||||
++ poke-tape |=(a/tape (poke %purl (scan a auri:epur)))
|
||||
++ poke-tape |=(a/tape (poke %purl (scan a auri:urlp)))
|
||||
++ poke-hiss |=(a/hiss (poke %hiss a))
|
||||
++ poke-noun poke-hiss
|
||||
++ sigh-wain |=({* a/wain} ~&(a `+>))
|
||||
|
@ -233,7 +233,7 @@
|
||||
++ dp-iden-url
|
||||
%+ cook
|
||||
|=({a/(unit knot) b/purl:^eyre} [`(fall a *knot) b])
|
||||
auru:epur:url:eyre
|
||||
auru:urlp:url:eyre
|
||||
::
|
||||
++ dp-model ;~(plug dp-server dp-config) :: ++dojo-model
|
||||
++ dp-path (tope he-beam) :: ++path
|
||||
|
@ -276,7 +276,7 @@
|
||||
:* %+ scan
|
||||
=+ [(trip i.pax) (trip i.t.pax)]
|
||||
"https://api.github.com/repos/{-<}/{->}/hooks"
|
||||
auri:epur
|
||||
auri:urlp
|
||||
%post ~ ~
|
||||
%- taco %- crip %- pojo %- jobe :~
|
||||
name+s+%web
|
||||
|
@ -252,7 +252,7 @@
|
||||
^- purl
|
||||
%+ scan
|
||||
"https://www.googleapis.com/gmail/v1/users/me{<`path`endpoint>}"
|
||||
auri:epur
|
||||
auri:urlp
|
||||
:: Send an HTTP req
|
||||
++ send-http
|
||||
|= hiz/hiss
|
||||
|
@ -223,7 +223,7 @@
|
||||
++ from-cookies
|
||||
|= {maf/math fil/$-({@t @t} ?)}
|
||||
=+ `cot/(list @t)`(~(get ju maf) 'cookie')
|
||||
=+ `cok/quay`(zing `(list quay)`(murn cot (curr rush cock:epur)))
|
||||
=+ `cok/quay`(zing `(list quay)`(murn cot (curr rush cock:urlp)))
|
||||
|- ^- (unit cord)
|
||||
?~ cok ~
|
||||
?:((fil i.cok) [~ q.i.cok] $(cok t.cok))
|
||||
@ -803,14 +803,14 @@
|
||||
%- emule |. ^+ ..apex
|
||||
=* sec p.kyz :: ? :: https bit
|
||||
=* heq r.kyz :: httq :: request content
|
||||
=+ ryp=`quri`(rash q.heq zest:epur)
|
||||
=+ ryp=`quri`(rash q.heq zest:urlp)
|
||||
=+ maf=(eat-headers r.heq)
|
||||
=+ ^= pul ^- purl
|
||||
?- -.ryp
|
||||
$& ?>(=(sec p.p.p.ryp) p.ryp)
|
||||
$| =+ hot=(~(get ja maf) %host)
|
||||
?> ?=({@ $~} hot)
|
||||
[[sec (rash i.hot thor:epur)] p.ryp q.ryp]
|
||||
[[sec (rash i.hot thor:urlp)] p.ryp q.ryp]
|
||||
==
|
||||
=. p.p.pul |(p.p.pul ?=(hoke r.p.pul))
|
||||
?: ?=($chis -.kyz) :: IPC escape hatch
|
||||
|
@ -4040,9 +4040,6 @@
|
||||
==
|
||||
-- ::
|
||||
:: :: ++epur:url:eyre
|
||||
++ epur :: url+header parser
|
||||
=>(urlp |=(a/cord `(unit purl)`(rush a auri)))
|
||||
:: :: ++fuel:url:eyre
|
||||
++ fuel :: parse urbit fcgi
|
||||
|= {bem/beam ced/noun:cred quy/|-($@($~ {p/@t q/@t t/$}))}
|
||||
^- epic
|
||||
|
@ -7,6 +7,6 @@
|
||||
=, sole
|
||||
:- %get |= {^ {a/tape $~} $~}
|
||||
^- (sole-request (cask httr))
|
||||
%+ sole-at (scan a auri:epur)
|
||||
%+ sole-at (scan a auri:urlp)
|
||||
|= hit/httr
|
||||
(sole-so %httr hit)
|
||||
|
@ -8,4 +8,4 @@
|
||||
::
|
||||
:- %say
|
||||
|= {^ {arg/tape $~} $~}
|
||||
purl+(scan arg auri:epur)
|
||||
purl+(scan arg auri:urlp)
|
||||
|
@ -87,7 +87,7 @@
|
||||
::
|
||||
++ endpoint-to-purl
|
||||
|= endpoint/path
|
||||
(scan (weld api-url <`path`endpoint>) auri:epur)
|
||||
(scan (weld api-url <`path`endpoint>) auri:urlp)
|
||||
::
|
||||
:: Return error. Used when no http response is expected.
|
||||
::
|
||||
|
@ -13,7 +13,7 @@
|
||||
|= a/$@(cord:purl purl) ^- purl
|
||||
?^ a a
|
||||
~| bad-url+a
|
||||
(rash a auri:epur)
|
||||
(rash a auri:urlp)
|
||||
::
|
||||
++ add-query
|
||||
|= {a/$@(@t purl) b/quay} ^- purl
|
||||
|
@ -24,7 +24,7 @@
|
||||
++ valve :: produce request
|
||||
|= {med/?($get $post) pax/path quy/quay}
|
||||
^- hiss
|
||||
=+ url=(scan "https://api.twitter.com/1.1/.json" auri:epur) :: base path
|
||||
=+ url=(scan "https://api.twitter.com/1.1/.json" auri:urlp) :: base path
|
||||
=. q.q.url (welp q.q.url pax)
|
||||
=. r.url quy
|
||||
^- hiss
|
||||
|
@ -16,10 +16,10 @@
|
||||
==
|
||||
:* %api %github
|
||||
login.sender.issue-comment
|
||||
(rash html-url.sender.issue-comment aurf:epur)
|
||||
(rash html-url.sender.issue-comment aurf:urlp)
|
||||
txt
|
||||
txt
|
||||
(rash html-url.comment.issue-comment aurf:epur)
|
||||
(rash html-url.comment.issue-comment aurf:urlp)
|
||||
%- jobe :~
|
||||
repository+s+name.repository.issue-comment
|
||||
number+(jone number.issue.issue-comment)
|
||||
|
@ -80,9 +80,9 @@
|
||||
^- speech:talk
|
||||
:* %api %github
|
||||
login.sender.issues
|
||||
(rash html-url.sender.issues aurf:epur)
|
||||
(rash html-url.sender.issues aurf:urlp)
|
||||
txt txt
|
||||
(rash html-url.issue.issues aurf:epur)
|
||||
(rash html-url.issue.issues aurf:urlp)
|
||||
%- jobe
|
||||
%+ welp
|
||||
:~ repository+s+name.repository.issues
|
||||
|
Loading…
Reference in New Issue
Block a user