We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop a custom app with ability to call API and custom the message base on the response. But won't able to get the IHttp work in anyway.
Sample code:
public async executePreMessageSentModify( message: IMessage, builder: IMessageBuilder, read: IRead, http: IHttp, persistence: IPersistence): Promise<IMessage> { this.checkHttp(http, "executePreMessageSentModify"); } private async checkHttp(http: IHttp, prefix: string): Promise<void> { try { const testResponse = await http.get('https://google.com', { timeout: 3000, strictSSL: false, rejectUnauthorized: false }); if (testResponse && testResponse.statusCode === 200) { await this.getLogger().log('Precheck @ ' + prefix + ': HTTP object is okay to use'); } else { await this.getLogger().log('Precheck @ ' + prefix + ': Got non-200 status code', testResponse ? testResponse.statusCode : 'No Response'); } } catch (error) { await this.getLogger().error('Precheck @ ' + prefix + ': HTTP object is not okay to use:', error.message); } }
this code always return the No Response as testResponse is always undefined
No Response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Develop a custom app with ability to call API and custom the message base on the response. But won't able to get the IHttp work in anyway.
Sample code:
this code always return the
No Response
as testResponse is always undefinedThe text was updated successfully, but these errors were encountered: