Can't get data via webserver

I can't get any data out of BTT via the webserver. Trying an example straight out of the docs...

machiavelli:~/tmp$ curl -i "http://127.0.0.1:12345/set_number_variable/?variableName=test&to=12345"
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Accept-Ranges: bytes
Content-Length: 0
Date: Tue, 26 Feb 2019 19:28:37 GMT

machiavelli:~/tmp$ curl -i "http://127.0.0.1:12345/get_number_variable/?variableName=test"
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Accept-Ranges: bytes
Content-Length: 0
Date: Tue, 26 Feb 2019 19:28:48 GMT

I've tried with and without a shared secret, with and without HTTPS. It's always the same, I just get a 200 response with no content. I can get a 403 error if I enable shared_secret and don't pass it in, so at least something is working as expected.

This seems really basic. What am I doing wrong?

I found the answer. You have to have "Allow external BetterTouchTool Scripting" enabled in addition to enabling the webserver. The text on the preference page and in the docs kind of implies that this switch is only for enabling the btt:// scheme.

It would be nice to get something other than a 200 OK response back from the webserver if external scripting overall isn't enabled. Ditto for AppleScript. It'd be nice to see some sort of error instead of just getting an empty value in return.

ah that seems to be a bug in the current version, I'll look into that.