Response body of new customer API is null

(Rahul Singh) #1

I tried to create a customer using, It was a success but response body was null?. How do I get my newly created customer ID and href.

Forbidden Error
(Spencer Hunter) #2

@rahulsingh, We won’t return JSON response bodies from HTTP 201 created responses. Instead we’ll include a Location header with a link which points to the newly created resource.

(Chethan Kumar) #3

AM not getting location in header. please check my code.
return‘customers’, requestBody).then(response => {
console.log(‘location’, response.headers.get(‘location’))

Please Replay me