codetour icon indicating copy to clipboard operation
codetour copied to clipboard

How can I send this JSON?

Open synedra opened this issue 4 years ago • 1 comments

This command works in the terminal, but not with >>. Can you make this work?

http POST :/rest/v2/schemas/keyspaces/workshop/tables json:='{ "name": "cavemen", "ifNotExists": false, "columnDefinitions": [ { "name": "firstname", "typeDefinition": "text", "static": false }, { "name": "lastname", "typeDefinition": "text", "static": false }, { "name": "occupation", "typeDefinition": "text" } ], "primaryKey": { "partitionKey": [ "lastname" ], "clusteringKey": [ "firstname" ] } }'

synedra avatar Oct 22 '21 21:10 synedra

Ends up looking like this:

[http POST :/rest/v2/schemas/keyspaces/workshop/tables json:='{](command:codetour.sendTextToTerminal?%5B%22http%20POST%20%3A%2Frest%2Fv2%2Fschemas%2Fkeyspaces%2Fworkshop%2Ftables%20json%3A%3D'%7B%5C%5C%22%5D "Run "http POST :/rest/v2/schemas/keyspaces/workshop/tables json:='{" in a terminal") "name": "cavemen", "ifNotExists": false, "columnDefinitions": [ { "name": "firstname", "typeDefinition": "text", "static": false }, { "name": "lastname", "typeDefinition": "text", "static": false }, { "name": "occupation", "typeDefinition": "text" } ], "primaryKey": { "partitionKey": [ "lastname" ], "clusteringKey": [ "firstname" ] } }'

synedra avatar Oct 22 '21 21:10 synedra