2013-04-25 1 views
0

그래서 여기에 class 전체 헤더 맵을 캐시해야합니다. 그래서 나는 그것을 어떻게 추출해야하는지 알았다.Poco C++ HTTPResponse 어떻게 응답 전체 헤더 맵을 얻을 수 있습니까?

어떻게하면 되나요? this처럼 반복 할 필요가 있습니까? 아니면 한 번에 모두 가져올 수 있습니까?

내가 좋아하는 캐시에 헤더지도를 저장하려는 :

 LRUPersistentCache<string, pair<HeaderMap, string > > *clientCache; 

답변

1
당신은 NameValueCollection은을 만들 수 있습니다

는 HttpResponse에에서 (그것은지도와 같은 HttpResponse에의 부모의) :

HTTPResponse response; 
// ... 
NameValueCollection nvc(response); 
LRUPersistentCache<string, NameValueCollection> clientCache(100); 
clientCache.add("myresponse", nvc); 
// ...