Structures & Enumerations

group http_server_struct

HTTP server data structures and type definitions.

Defines

EXPAND_AS_ENUMERATION(a, b)

Macro to expand the enumeration.

MIME_TABLE(ENTRY)

MIME table.

Typedefs

typedef void *cy_http_server_t

HTTP server handle.

typedef int32_t (*url_processor_t)(const char *url_path, const char *url_query_string, cy_http_response_stream_t *stream, void *arg, cy_http_message_body_t *http_data)

Prototype for URL processor functions.

Parameters
  • [in] url_path: : URL path.

  • [in] url_query_string: : NULL terminated URL query string.

  • [in] stream: : HTTP stream on which data was received.

  • [in] arg: : Arguments passed along with callback function.

  • [in] http_data: : Buffer having HTTP data

Enums

enum cy_http_request_type_t

cy_http_request_type_t: HTTP request type.

Values:

enumerator CY_HTTP_REQUEST_GET

HTTP server GET request type.

enumerator CY_HTTP_REQUEST_POST

HTTP server POST request type.

enumerator CY_HTTP_REQUEST_PUT

HTTP server PUT request type.

enumerator CY_HTTP_REQUEST_UNDEFINED

HTTP server undefined request type.

enum cy_http_cache_t

cy_http_cache_t: HTTP cache.

Values:

enumerator CY_HTTP_CACHE_DISABLED

Do not cache previously fetched resources.

enumerator CY_HTTP_CACHE_ENABLED

Allow caching of previously fetched resources.

enum cy_http_mime_type_t

cy_http_mime_type_t: HTTP MIME type.

note

Refer to the 1st argument of MIME_TABLE for the list of MIME types supported. Example: MIME_TYPE_TLV.

Values:

enum cy_http_status_codes_t

cy_http_status_codes_t: HTTP status code.

Values:

enumerator CY_HTTP_200_TYPE

OK.

enumerator CY_HTTP_204_TYPE

No Content.

enumerator CY_HTTP_207_TYPE

Multi-Status.

enumerator CY_HTTP_301_TYPE

Moved Permanently.

enumerator CY_HTTP_400_TYPE

Bad Request.

enumerator CY_HTTP_403_TYPE

Forbidden.

enumerator CY_HTTP_404_TYPE

Not Found.

enumerator CY_HTTP_405_TYPE

Method Not Allowed.

enumerator CY_HTTP_406_TYPE

Not Acceptable.

enumerator CY_HTTP_412_TYPE

Precondition Failed.

enumerator CY_HTTP_415_TYPE

Unsupported Media Type.

enumerator CY_HTTP_429_TYPE

Too Many Requests.

enumerator CY_HTTP_444_TYPE

No Response.

enumerator CY_HTTP_470_TYPE

Connection Authorization Required.

enumerator CY_HTTP_500_TYPE

Internal Server Error.

enumerator CY_HTTP_504_TYPE

Gateway Timeout.

enum cy_url_resource_type

cy_url_resource_type: HTTP server resource type.

Values:

enumerator CY_STATIC_URL_CONTENT

Page is constant data in memory-addressable area.

enumerator CY_DYNAMIC_URL_CONTENT

Page is dynamically generated by a url_processor_t type function.

enumerator CY_RESOURCE_URL_CONTENT

Page data is provided by a Resource which may reside off-chip.

Currently this URL type is not supported in Mbed OS and AnyCloud frameworks.

enumerator CY_RAW_STATIC_URL_CONTENT

Same as CY_STATIC_URL_CONTENT, but the HTTP header must be supplied as part of the content.

enumerator CY_RAW_DYNAMIC_URL_CONTENT

Same as CY_DYNAMIC_URL_CONTENT, but the HTTP header must be supplied as part of the content.

enumerator CY_RAW_RESOURCE_URL_CONTENT

Same as CY_RESOURCE_URL_CONTENT, but the HTTP header must be supplied as part of the content.

struct cy_http_message_body_t
#include <cy_http_server.h>

HTTP message structure that gets passed to dynamic URL processor functions.

struct cy_http_response_stream_t
#include <cy_http_server.h>

Context structure for HTTP server stream Users should not access these values - they are provided here only to provide the compiler with datatype size information that allows static declarations.

struct cy_https_server_security_info_t
#include <cy_http_server.h>

HTTP server security info.

struct cy_resource_dynamic_data_t
#include <cy_http_server.h>

Dynamic HTTP resource info.

struct cy_resource_static_data_t
#include <cy_http_server.h>

Static HTTP resource info.