APISonar


org.apache.jmeter.protocol.http.util.HTTPConstants.DATE

> org > apache > jmeter > protocol > http > util > HTTPConstants > DATE
org APIs apache APIs jmeter APIs protocol APIs http APIs util APIs HTTPConstants APIs DATE APIs

Example 1
public void saveDetails(URLConnection conn, HTTPSampleResult res){
        if (isCacheable(res)){
            String lastModified = conn.getHeaderField(HTTPConstants.LAST_MODIFIED);
            String expires = conn.getHeaderField(HTTPConstants.EXPIRES);
            String etag = conn.getHeaderField(HTTPConstants.ETAG);
            String url = conn.getURL().toString();
            String cacheControl = conn.getHeaderField(HTTPConstants.CACHE_CONTROL);
            String date = conn.getHeaderField(HTTPConstants.DATE);
            setCache(lastModified, cacheControl, expires, etag, url, date);
        }
    }
Example 2
public void saveDetails(HttpMethod method, SampleResult res) throws URIException{
        if (isCacheable(res)){
            String lastModified = getHeader(method ,HTTPConstants.LAST_MODIFIED);
            String expires = getHeader(method ,HTTPConstants.EXPIRES);
            String etag = getHeader(method ,HTTPConstants.ETAG);
            String url = method.getURI().toString();
            String cacheControl = getHeader(method, HTTPConstants.CACHE_CONTROL);
            String date = getHeader(method, HTTPConstants.DATE);
            setCache(lastModified, cacheControl, expires, etag, url, date);
        }
    }