play.utils

## Class HTTP

- java.lang.Object
- - play.utils.HTTP

-     public class HTTP
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `HTTP.ContentTypeWithEncoding`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HTTP()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    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.
    `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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HTTP

          public HTTP()

  - ### Method Detail

    - #### parseContentType

          public static HTTP.ContentTypeWithEncoding parseContentType(java.lang.String contentType)

    - #### fixCaseForHttpHeader

          public 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'
      Parameters:
        `headerName` - The given header name to check
      Returns:
        The correct header name

    - #### isModified

          public 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

      Parameters:
        `etag` - the entity tag
        `last` - a Last-Modified value
        `browserEtag` - an entity tag from request header
        `ifModifiedSince` - a Last-Modified value from request header 'If-Modified-Since'
      Returns:
        `true` if the entity was modified
      See Also:
        RFC 2616 - Hypertext Transfer Protocol - Section 14.26

Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly