matlab.net.http.field.HTTPDateField 클래스
패키지: matlab.net.http.field
슈퍼클래스: matlab.net.http.HeaderField
날짜를 포함하는 HTTP 헤더 필드
설명
HTTPDateField
객체는 날짜를 포함하는 HTTP 헤더 필드입니다. 이 클래스에서 구현하는 필드는 표준 HTTP 날짜 형식의 단일 날짜를 포함합니다.
생성
속성
Name
— 날짜 필드 이름
'Date'
| 'Expires'
| 'Retry-After'
| 'Accept-Datetime'
| 'Last-Modified'
| 'If-Modified-Since'
날짜 필드 이름으로, 값 'Date'
, 'Expires'
, 'Retry-After'
, 'Accept-Datetime'
, 'Last-Modified'
, 'If-Modified-Since'
중 하나로 지정됩니다.
Date
필드를 생성하려면 서브클래스인 matlab.net.http.field.DateField
를 사용하십시오.
특성:
GetAccess | public |
SetAccess | public |
Value
— 날짜
datetime
| string형
날짜로, datetime
형 객체로 지정되거나 RFC 7231 Semantics and Content, section 7.1.1.1. Date/Time Formats(IETF®(Internet Engineering Task Force) 웹 사이트)에 지정된 유효한 HTTP 날짜 형식의 string형으로 지정됩니다. datetime
형 객체에 표준 시간대가 없는 경우 현지 표준 시간대인 것으로 간주됩니다.
특성:
GetAccess | public |
SetAccess | public |
Dependent | true |
메서드
퍼블릭 메서드
addFields | HeaderField 배열에 필드 추가 |
removeFields | 헤더 필드 배열에서 필드 제거 |
changeFields | HeaderField 배열의 기존 값 변경 |
replaceFields | HeaderField 배열의 값 변경 또는 HeaderField 배열에 필드 추가 |
getFields | 이름이나 클래스가 일치하는 헤더 필드 반환 |
eq | 두 개의 HeaderField 배열 비교 |
convertLike | 다른 헤더 필드와 유사하게 헤더 필드 값 변환 |
parse | 헤더 필드 값을 구문 분석하고 string형으로 반환 |
displaySubclasses | 지원되는 HeaderField 서브클래스 표시 |
서브클래스에 대해 특화된 메서드
특화된 연산자와 함수
다음 메서드는 표준 MATLAB 연산자와 함수를 이 클래스의 객체를 위해 특화합니다.
isequal |
|
string | 헤더 필드로 구성된 배열을 메시지에 나타나는 대로 string형으로 반환합니다. 새 줄 문자가 필드와 필드 사이에 삽입되지만, 모든 필드의 끝에는 삽입되지 않습니다. |
char | 헤더 필드로 구성된 배열을 |
예제
HTTP 날짜 필드 표시하기
이 예제에서는 메시지의 HTTP 날짜 필드를 읽는 방법을 보여줍니다.
import matlab.net.*; import matlab.net.http.*; import matlab.net.http.field.*; httpsUrl = 'https://requestserver.mathworks.com'; uri = URI(strcat(httpsUrl, '/assets/computerVision.jpg')); headers = DateField(datetime("today")); req = RequestMessage('GET', headers); response = req.send(uri); httpDateField = response.getFields("Last-Modified"); disp(httpDateField)
HTTPDateField with properties: Name: "Last-Modified" Value: "Fri, 02 Apr 2021 20:14:03 GMT"
버전 내역
R2016b에 개발됨
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)