2
JSON 파일에서 데이터를 가져옵니다.2 각도의 json 파일의 최종 수정 날짜를 얻는 방법
나는 마지막으로 그 JSON 파일
private _url = 'http://localhost:54362/app/output.json';
this.http.get(this._url)
.toPromise()
.then((response) => {
this.jsonData = response.json();
}).catch((err) => {
console.log(err);
});
는 어떻게과 lastModified 날짜를 얻을 수있는 방법 내가 JSON 파일에서 데이터를 가져 오는하고 여기에
의 날짜를 수정하려는 ??
편집 :이 같은 얻고 헤더에서
...
console.log(response.headers._headers)
Map {"date" => ["Thu, 28 Dec 2017 08:29:15 GMT"], "etag" => [""8b6668d5a47fd31:0""], "last-modified" => ["Thu, 28 Dec 2017 06:26:45 GMT"], "server" => ["Microsoft-IIS/10.0"], "x-powered-by" => ["ASP.NET"]…}
방법이에서 마지막으로 수정 한 날짜에 액세스 할 수 ???
https://stackoverflow.com/questions/45505619/angular-4-3-3-httpclient-how-get-value-from -the-head-of-a-response는 응답 헤더를 읽는 데 도움이됩니다. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified –
귀하의 의견에 따라 게시물을 편집하여주십시오. – Aarsh