to be converted to 151

This commit is contained in:
Henry Ault 2016-02-18 11:02:26 -08:00 committed by Philip C Monk
parent 216e70d072
commit 2329d5dce0
2 changed files with 32 additions and 16 deletions

View File

@ -19,6 +19,9 @@
:: ::
/? 314 /? 314
/+ http /+ http
::::
/= rfc /: /%/rfc /txt/
::
// /%/split // /%/split
::/- gmail ::/- gmail
:: /ape/gh/split.hoon defines ++split, which splits a request :: /ape/gh/split.hoon defines ++split, which splits a request
@ -59,7 +62,7 @@
== ==
:: ::
++ poke-gmail-req ++ poke-gmail-req
|= [method=meth endpoint=path quy=quay jon=(unit json)] |= [method=meth endpoint=path quy=quay]::jon=(unit json)]
^- [(list move) _+>.$] ^- [(list move) _+>.$]
?> ?=(valid-get-endpoint endpoint) ?> ?=(valid-get-endpoint endpoint)
:_ +>.$ :_ ~ :_ +>.$ :_ ~
@ -68,11 +71,17 @@
^- purl ^- purl
:+ [& ~ [%& /com/googleapis/www]] :+ [& ~ [%& /com/googleapis/www]]
[~ gmail/v1/users/me/`valid-get-endpoint`endpoint] [~ gmail/v1/users/me/`valid-get-endpoint`endpoint]
~ `quay`[[%alt %json] ~]
:+ method ~ ::
?~ jon ~ :+ method `math`(mo ~[content-type/['application/json']~])
~& (taco (crip (pojo u.jon))) =+ json-data=(joba %raw (jape (sifo (role rfc))))
(some (taco (crip (pojo u.jon)))) :: have to make it a unit again ~& json-data
=+ six-four=(tact (pojo json-data))
~& sixf/six-four
(some six-four)
::?~ jon ~
::~& (taco (crip (pojo u.jon)))
::(some (taco (crip (pojo u.jon)))) :: have to make it a unit again
== ==
:: ::
:: HTTP response. We make sure the response is good, then :: HTTP response. We make sure the response is good, then
@ -82,6 +91,7 @@
++ sigh-httr ++ sigh-httr
|= [wir=wire res=httr] |= [wir=wire res=httr]
^- [(list move) _+>.$] ^- [(list move) _+>.$]
~& rfc/rfc
?. ?=([care @ @ @ *] wir) ?. ?=([care @ @ @ *] wir)
:: pokes don't return anything :: pokes don't return anything
~& poke/res ~& poke/res
@ -143,22 +153,22 @@
:: ::
++ help ++ help
|= [ren=care style=@tas pax=path] |= [ren=care style=@tas pax=path]
=^ query-n-arg pax [+ -]:(split pax) ~& pax
=+ ^- [query=quay arg=path] =^ query pax
=+ gra=(flop query-n-arg) =+ xap=(flop pax)
?~ gra [~ ~] ?~ xap [~ ~]
=+ query=(rush i.gra ;~(pfix wut yquy:urlp)) =+ query=(rush i.xap ;~(pfix wut yquy:urlp))
?~ query [~ (flop gra)] ?~ query [~ pax]
[u.query (flop t.gra)] [u.query (flop t.xap)]
~& [arg=arg q=query] =^ arg pax [+ -]:(split pax)
~& [pax=pax arg=arg query=query]
=| mow=(list move) =| mow=(list move)
|% |%
:: Resolve core :: Resolve core
:: ::
++ make-move ++ make-move
^- [(list move) _+>.$] ^- [(list move) _+>.$]
!! [(flop mow) +>.$]
::[(flop mow) +>.$]
:: ::
++ endpoint-to-purl ++ endpoint-to-purl
|= endpoint=path |= endpoint=path

View File

@ -0,0 +1,6 @@
From: urbit-test@gmail.com
To: jhenry.ault@gmail.com
Subject: As basic as it gets
This is the plain text body of the message. Note the blank line
between the header information and the body of the message.