fix(core): update
This commit is contained in:
parent
6dd3782b0d
commit
430c3ea13a
@ -20,6 +20,10 @@ messaging service for micro services
|
|||||||
|
|
||||||
Use TypeScript for best in class instellisense.
|
Use TypeScript for best in class instellisense.
|
||||||
|
|
||||||
|
### What does smartuniverse all about?
|
||||||
|
|
||||||
|
Think WhatsApp, but for your microservices architecture. It allows your services to securely talk to each other in private, shielded channels without having to expose anything to the outside world. This allows the use of reactive programming across your entire stack.
|
||||||
|
|
||||||
For further information read the linked docs at the top of this readme.
|
For further information read the linked docs at the top of this readme.
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
@ -32,17 +32,18 @@ export class ClientUniverse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async sendMessage(messageArg, payloadArg) {
|
public async sendMessage(messageArg, payloadArg) {
|
||||||
const requestBody = {
|
const requestBody: interfaces.IUniverseMessage = {
|
||||||
message: messageArg,
|
message: messageArg,
|
||||||
payload: payloadArg
|
payload: payloadArg
|
||||||
};
|
};
|
||||||
|
const requestBodyString = JSON.stringify(requestBody);
|
||||||
// TODO: User websocket connection if available
|
// TODO: User websocket connection if available
|
||||||
await plugins.smartrequest.postJson(this.options.serverAddress, {
|
const response = await plugins.smartrequest.postJson(`${this.options.serverAddress}/sendmessage` , {
|
||||||
requestBody
|
requestBody: requestBodyString
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getChannel(channelName: string): Promise<ClientUniverseChannel> {
|
public async getChannel(channelName: string, passphrase): Promise<ClientUniverseChannel> {
|
||||||
await this.checkConnection();
|
await this.checkConnection();
|
||||||
const clientUniverseChannel = await ClientUniverseChannel.createClientUniverseChannel(
|
const clientUniverseChannel = await ClientUniverseChannel.createClientUniverseChannel(
|
||||||
this,
|
this,
|
||||||
|
Loading…
Reference in New Issue
Block a user