save(body) {
let headers = new HttpHeaders()
headers.append('Content-Type', 'text/plain')
return this.callWorkflowService
.getRawDataflow()
.pipe(
map(data => {
data['jobs'] = body
return data
})
)
.pipe(newData => // correspond to `return data`
this.httpClient
.post(this.url, JSON.stringify(newData), { headers: headers })
.pipe(
map(res => {
return res
})
)
)
}
What I'm getting actually inside the httpRequest is an Observable instead of an Object. I don't understand why.