I have post http request which sends large amount of data, and contains array which can be quite large. I am trying to split the request so instead sending one request which contains all of the data, I would like to send it in chunks.
// service.ts
saveRequest(request: AutomationChecklist) {
return this.http
.post(this.url + this.saveRequestUrl, request, this.options)
.map((response: Response) => {
return response.json();
});
}
// automationChecklist.ts
export class AutomationChecklist {
siteInformation: siteInformation;
orderInformation: OrderInformation;
requestInformation: RequestInformation;
contactInformation: ContactInformation;
installations: Installation[]; // save this separately, this one can be quite large
completedAutomation: number;
progress: number;
}
what can be the possible solution to handle this request? I have read about forkjoin rxjs but not sure if it will be suitable for this situation?