head
head
HTTP HEAD 요청을 수행합니다(헤더만, 본문 없음).
파라미터
| 이름 | 타입 | 설명 |
|---|---|---|
url | String | 요청할 URL |
headers | Map? | 요청 헤더. 생략 가능(null). 기본 헤더(Content-Type: application/json, Accept: application/json)에 병합되어 전송됨 |
jsCallback | JSFunction? | 응답을 받는 콜백 |
콜백
jsCallback(statusCode, headers, body)로 호출됩니다. body는 항상 비어 있습니다.
| 인자 | 타입 | 설명 |
|---|---|---|
statusCode | number | 응답 상태 코드 |
headers | Map | 응답 헤더 |
body | String | 응답 본문 (HEAD 요청이라 항상 비어 있음) |
반환: void
Example
$http.head("https://api.example.com/user/1", {}, function (status, headers, body) {
$log.d(status, headers);
});