Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
updateJob(job) {
return this.http.put(this.getJobUrl(job.id), serialize(job), { headers: this.headers })
.toPromise()
.then(res => res.json())
.catch(this.handleError);
}
addJob(job) {
return this.http.post(this.url, serialize(job), { headers: this.headers })
.toPromise()
.then(res => res.json())
.catch(this.handleError);
}
serialize (obj: T): string {
return serialize(obj)
}