http.client: using http-request*.

db4
John Benediktsson 2013-10-12 10:57:08 -07:00
parent 6a2d6971c6
commit adc3ee4c81
3 changed files with 3 additions and 4 deletions

View File

@ -183,7 +183,7 @@ PRIVATE>
: post-rpc ( rpc url -- rpc' ) : post-rpc ( rpc url -- rpc' )
! This needs to do something in the event of an error ! This needs to do something in the event of an error
rpc-post-request http-request nip string>xml receive-rpc ; rpc-post-request http-request* string>xml receive-rpc ;
: invoke-method ( params method url -- response ) : invoke-method ( params method url -- response )
[ swap <rpc-method> ] dip post-rpc ; [ swap <rpc-method> ] dip post-rpc ;

View File

@ -64,7 +64,7 @@ IN: bitcoin.client
payload bitcoin-url <post-request> payload bitcoin-url <post-request>
basic-auth "Authorization" set-header basic-auth "Authorization" set-header
dup post-data>> data>> length "Content-Length" set-header dup post-data>> data>> length "Content-Length" set-header
http-request nip >string json> "result" of ; http-request* >string json> "result" of ;
PRIVATE> PRIVATE>

View File

@ -60,8 +60,7 @@ MACRO: keys-boa ( keys class -- )
[ <oauth-request-params> set-oauth ] with-twitter-oauth ; [ <oauth-request-params> set-oauth ] with-twitter-oauth ;
: twitter-request ( request -- data ) : twitter-request ( request -- data )
set-request-twitter-auth set-request-twitter-auth http-request* ; inline
http-request nip ; inline
PRIVATE> PRIVATE>