public class HTTP
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
HTTP.ContentTypeWithEncoding |
Constructor and Description |
---|
HTTP() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
fixCaseForHttpHeader(java.lang.String headerName)
Use this method to make sure you have the correct casing of a http header name. eg: fixes 'content-type' to
'Content-Type'
|
static boolean |
isModified(java.lang.String etag,
long last,
java.lang.String browserEtag,
java.lang.String ifModifiedSince)
Checks if an entity was modified or not
|
static HTTP.ContentTypeWithEncoding |
parseContentType(java.lang.String contentType) |
public static HTTP.ContentTypeWithEncoding parseContentType(java.lang.String contentType)
public static java.lang.String fixCaseForHttpHeader(java.lang.String headerName)
headerName
- The given header name to checkpublic static boolean isModified(java.lang.String etag, long last, java.lang.String browserEtag, java.lang.String ifModifiedSince)
Checks if an entity was modified or not
etag
- the entity taglast
- a Last-Modified valuebrowserEtag
- an entity tag from request headerifModifiedSince
- a Last-Modified value from request header 'If-Modified-Since'true
if the entity was modifiedGuillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly