diff options
author | Sam Wilkins <35748010+samwilkins333@users.noreply.github.com> | 2019-08-08 10:59:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-08 10:59:09 -0400 |
commit | 9776f0dbb1189105e5b947beb107203f4404c40c (patch) | |
tree | d6e3e0ecb1398174756183ce2d8a6662b33b29b0 /src/Utils.ts | |
parent | 44a0bc3546eca5fa18f3599448ebcebf709e3f90 (diff) | |
parent | f3a1b96c5587249a1f6d45ecc9b462215da479e2 (diff) |
Merge pull request #241 from browngraphicslab/speech-to-text
Speech to text overlay with registered commands on shift+space
Diffstat (limited to 'src/Utils.ts')
-rw-r--r-- | src/Utils.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Utils.ts b/src/Utils.ts index bad875f0d..959b89fe5 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -3,6 +3,7 @@ import v5 = require("uuid/v5"); import { Socket } from 'socket.io'; import { Message } from './server/Message'; import { RouteStore } from './server/RouteStore'; +import requestPromise = require('request-promise'); export class Utils { @@ -175,4 +176,14 @@ export namespace JSONUtils { return results; } +} + +export function PostToServer(relativeRoute: string, body: any) { + let options = { + method: "POST", + uri: Utils.prepend(relativeRoute), + json: true, + body: body + }; + return requestPromise.post(options); }
\ No newline at end of file |