http.client: using http-request*.
parent
6a2d6971c6
commit
adc3ee4c81
|
@ -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 ;
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue