Paste: local variables?

Author: otoburb
Mode: factor
Date: Wed, 16 Dec 2009 07:11:33
Plain Text |
<PRIVATE

: readln-namespace ( hashtable -- namespace ) 
    "New namespace name: " write readln "name" pick set-at ;

: readln-description ( hashtable -- description ) 
    "Description: " write readln "description" pick set-at ;

PRIVATE>


: post-namespace ( -- response )
    "application/json" <post-data>
    H{ } readln-namespace readln-description >json utf8 encode >>data
    sandbox "/namespaces/" user 3append
    add-basic-auth-header <post-request> ; 

New Annotation

Summary:
Author:
Mode:
Body: