Definitions common to HTTP client and server. More...
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL HTTP_TRACE_LEVEL |
Functions | |
error_t | httpCheckCharset (const char_t *s, size_t length, uint_t charset) |
Check whether a string contains valid characters. More... | |
error_t | httpParseParam (const char_t **pos, HttpParam *param) |
Parse a list of parameters. More... | |
bool_t | httpCompareParamName (const HttpParam *param, const char_t *name) |
Compare parameter name with the supplied string. More... | |
bool_t | httpCompareParamValue (const HttpParam *param, const char_t *value) |
Compare parameter name with the supplied string. More... | |
error_t | httpCopyParamValue (const HttpParam *param, char_t *value, size_t maxLen) |
Copy the value of a parameter. More... | |
void | httpEncodeHexString (const uint8_t *input, size_t inputLen, char_t *output) |
Convert byte array to hex string. More... | |
Detailed Description
Definitions common to HTTP client and server.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file http_common.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL HTTP_TRACE_LEVEL |
Definition at line 32 of file http_common.c.
Function Documentation
◆ httpCheckCharset()
Check whether a string contains valid characters.
- Parameters
-
[in] s Pointer to the string [in] length Length of the string [in] charset Acceptable charset
- Returns
- Error code
Definition at line 49 of file http_common.c.
◆ httpCompareParamName()
Compare parameter name with the supplied string.
- Parameters
-
[in] param Pointer to the parameter [in] name NULL-terminated string
- Returns
- Comparison result
Definition at line 368 of file http_common.c.
◆ httpCompareParamValue()
Compare parameter name with the supplied string.
- Parameters
-
[in] param Pointer to the parameter [in] value NULL-terminated string
- Returns
- Comparison result
Definition at line 401 of file http_common.c.
◆ httpCopyParamValue()
Copy the value of a parameter.
- Parameters
-
[in] param Pointer to the parameter [out] value Pointer to the buffer where to copy the parameter value [out] maxLen Maximum number of characters the buffer can hold
- Returns
- Error code
Definition at line 435 of file http_common.c.
◆ httpEncodeHexString()
void httpEncodeHexString | ( | const uint8_t * | input, |
size_t | inputLen, | ||
char_t * | output | ||
) |
Convert byte array to hex string.
- Parameters
-
[in] input Point to the byte array [in] inputLen Length of the byte array [out] output NULL-terminated string resulting from the conversion
Definition at line 475 of file http_common.c.
◆ httpParseParam()
Parse a list of parameters.
- Parameters
-
[in,out] pos Actual position if the list of parameters [out] param Structure that contains the parameter name and value
- Returns
- Error code
Definition at line 117 of file http_common.c.