Hi, before update to ionic-framework-2.0.0-alpha.42
i had a http request working but now it’s not, it seems like the update removed certain functions from the observable returned by http:
headers.append('Content-Type', 'application/json');
this.http.post(url, JSON.stringify(json), {headers: headers})
.retry(2)
.timeout(10000, new Error('Tiempo de espera alcanzado.'))
.delay(10)
.map((res) => res.json())
.subscribe(
(data) => resolve(data),
(err) => reject(err)
);
The former doesn’t work any more, looks like the functions retry
, timeout
, delay
and map
doesn’t exist or are unavaliable to the Observable, the next does work:
headers.append('Content-Type', 'application/json');
this.http.post(url, JSON.stringify(json), {headers: headers})
.subscribe(
(data) => resolve(data),
(err) => reject(err)
);