I have a code where I POST a request and the response code is 201 created with "Location": "URL" header of the new created resource.
final Response response = await _http.post(getUri(_url), body: plan);
return _getPlan(response.headers['location']);
Where _http
is a BrowserClient from the package http-0.12.0+1
. But the response.headers['Location']
is empty. The headers
array itself contains only one element Content-Type
.
In Chrome developers tools I see all response headers including Location
.
What am I doing wrong? How can I access the response headers?