This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I am testing against a 3rd party endpoint for timeouts when consuming their data, I've set my timeout to 5000 but my httpSertvice.post continues way past that time, am I doing something wrong?
My module setup;
imports: [
HttpModule,
HttpModule.registerAsync({
useFactory: () => ({
timeout: 5000,
maxRedirects: 5,
}),
}),
]
My httpService.post;
async sendHttp(xmlToSend): Promise<AxiosResponse\> {
xmlToSend = xmlToSend.replace(/>\s*/g, '>'); // Remove space after >
xmlToSend = xmlToSend.replace(/\s*</g, '<'); // Remove space before <
xmlToSend = xmlToSend.replace(new RegExp("\\n", "g"), '');
const headersRequest = {
'Accept': '*/*',
'Content-Type': 'text/xml'
};
return await this.httpService.post(
'https://blahblah/webservices/onlineflow.asp',
xmlToSend,
{
headers: headersRequest,
responseType: 'text'
},
).toPromise();
// return response;
}
Subreddit
Post Details
- Posted
- 2 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Nestjs_fram...