2011-10-05 4 views
-1

GET 요청에 대한 restlet의 lastmodified/Etag/Cache 헤더를 보내는 간단한 예제를 찾을 수 없습니다.GET 요청에 대한 restlet의 lastmodified/Etag/Cache 헤더 보내기

감사

+0

의 서브 클래스이기 때문에 Representation 클래스에서 직접 호출 할 수 있습니다. 답 [여기] [1]을 찾았습니다. [1] : http://stackoverflow.com/questions/9015511/setting-etag-lastmodified-on-representation-sent-by-serverresource –

답변

0

당신은 아마 RepresentationInfo 클래스를 찾고 그리고 당신이 도울 수있는 멤버 함수 연관된 : http://www.restlet.org/documentation/2.0/jse/api/org/restlet/representation/RepresentationInfo.html

그것은 4 개 차 방법을 얻을 수있다/세트 태그/ModificationDate

당신 RepresentationInfo

+0

하지만 당신은 ServerResource 곳의 서브 클래스 내에서이를 설정하는 방법 그 표현은 여전히 ​​협상 될 것인가? – koma

+0

@koma - 메서드가 호출 될 때 표현이 협상됩니다. 'Representation' 인자가'@ Get' 메쏘드에 전달됩니다 - 당신이 이것을 사용할 것입니다. 나는 당신이 혼란스러워하는 것에 대해 확신하지 못합니다. – PhD

관련 문제