! This needs to do something in the event of an error
[ send-rpc ] dip http-post nip string>xml receive-rpc ;
-: invoke-method ( params method url -- )
+: invoke-method ( params method url -- response )
[ swap <rpc-method> ] dip post-rpc ;
: decode-number-array ( x -- y ) \r
"," split [ string>number ] map ;\r
\r
-TAGS: adsoda-read-model ( tag -- )\r
+TAGS: adsoda-read-model ( tag -- model )\r
\r
TAG: dimension adsoda-read-model \r
children>> first string>number ;\r
;\r
\r
: read-model-file ( path -- x )\r
- dup\r
- [\r
- [ file>xml "space" tags-named first adsoda-read-model ] \r
- [ drop <space> ] recover \r
- ] [ drop <space> ] if \r
-\r
+ [\r
+ [ file>xml "space" tag-named adsoda-read-model ] \r
+ [ 2drop <space> ] recover \r
+ ] [ <space> ] if*\r
;\r
\r