Reviewed-by: Jaben Carsey <jaben.car...@intel.com>

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Samer El-Haj-Mahmoud
> Sent: Friday, October 30, 2015 4:08 PM
> To: edk2-devel@lists.01.org
> Cc: Tian, Feng <feng.t...@intel.com>; Samer El-Haj-Mahmoud <samer.el-haj-
> mahm...@hp.com>
> Subject: [edk2] [PATCH v2] MdeModulePkg: Add some common HTTP
> definitions
> 
> Add common HTTP definitions for use in HTTP clients/applications.
> List includes: HTTP methods, request/response headers, and encodings.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hpe.com>
> ---
>  MdeModulePkg/Include/Library/HttpLib.h | 43
> ++++++++++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
> 
> diff --git a/MdeModulePkg/Include/Library/HttpLib.h
> b/MdeModulePkg/Include/Library/HttpLib.h
> index ce5a839..8d5412e 100644
> --- a/MdeModulePkg/Include/Library/HttpLib.h
> +++ b/MdeModulePkg/Include/Library/HttpLib.h
> @@ -3,6 +3,7 @@
>    It provides the helper routines to parse the HTTP message byte stream.
> 
>  Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
> +(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
>  This program and the accompanying materials
>  are licensed and made available under the terms and conditions of the BSD
> License
>  which accompanies this distribution.  The full text of the license may be 
> found
> at<BR>
> @@ -18,6 +19,48 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY
> KIND, EITHER EXPRESS OR IMPLIED.
> 
>  #include <Protocol/Http.h>
> 
> +
> +///
> +/// HTTP Request Method definitions
> +///
> +#define HTTP_METHOD_GET     "GET"
> +#define HTTP_METHOD_POST    "POST"
> +#define HTTP_METHOD_PATCH   "PATCH"
> +#define HTTP_METHOD_OPTIONS "OPTIONS"
> +#define HTTP_METHOD_CONNECT "CONNECT"
> +#define HTTP_METHOD_HEAD    "HEAD"
> +#define HTTP_METHOD_PUT     "PUT"
> +#define HTTP_METHOD_DELETE  "DELETE"
> +#define HTTP_METHOD_TRACE   "TRACE"
> +
> +///
> +/// HTTP Request Headers definitions
> +///
> +#define HTTP_REQUEST_HEADER_ACCEPT              "Accept"
> +#define HTTP_REQUEST_HEADER_ACCEPT_LANGUAGE     "Accept-Language"
> +#define HTTP_REQUEST_HEADER_CONTENT_LENGTH      "Content-Length"
> +#define HTTP_REQUEST_HEADER_CONTENT_TYPE        "Content-Type"
> +#define HTTP_REQUEST_HEADER_CONTENT_ENCODING    "Content-
> Encoding"
> +#define HTTP_REQUEST_HEADER_HOST                "Host"
> +#define HTTP_REQUEST_HEADER_IF_MATCH            "If-Match"
> +#define HTTP_REQUEST_HEADER_IF_NONE_MATCH       "If-None-Match"
> +#define HTTP_REQUEST_HEADER_AUTHORIZATION       "Authorization"
> +
> +///
> +/// HTTP Response Header definitions
> +///
> +#define HTTP_RESPONSE_HEADER_CONTENT_LENGTH     "Content-Length"
> +#define HTTP_RESPONSE_HEADER_CONTENT_TYPE       "Content-Type"
> +#define HTTP_RESPONSE_HEADER_LOCATION           "Location"
> +#define HTTP_RESPONSE_HEADER_CACHE_CONTROL      "Cache-Control"
> +#define HTTP_RESPONSE_HEADER_ETAG               "ETag"
> +
> +///
> +/// HTTP Content-Type encodings
> +///
> +#define HTTP_CONTENT_TYPE_APP_JSON              "application/json"
> +#define HTTP_CONTENT_TYPE_APP_JSON_UTF8         "application/json;
> charset=utf-8"
> +
>  /**
>    Decode a percent-encoded URI component to the ASCII character.
> 
> --
> 1.9.5.msysgit.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to