1 /***************************************************************************
2  * Copyright (c) 2024 Microsoft Corporation
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the MIT License which is available at
6  * https://opensource.org/licenses/MIT.
7  *
8  * SPDX-License-Identifier: MIT
9  **************************************************************************/
10 
11 
12 /**************************************************************************/
13 /**************************************************************************/
14 /**                                                                       */
15 /** NetX Web Component                                                    */
16 /**                                                                       */
17 /**   Hypertext Transfer Protocol (HTTP)                                  */
18 /**   Hypertext Transfer Protocol Secure (HTTPS using TLS)                */
19 /**                                                                       */
20 /**************************************************************************/
21 /**************************************************************************/
22 
23 
24 /**************************************************************************/
25 /*                                                                        */
26 /*  APPLICATION INTERFACE DEFINITION                       RELEASE        */
27 /*                                                                        */
28 /*    nx_web_http_client.h                                PORTABLE C      */
29 /*                                                           6.1.6        */
30 /*  AUTHOR                                                                */
31 /*                                                                        */
32 /*    Yuxin Zhou, Microsoft Corporation                                   */
33 /*                                                                        */
34 /*  DESCRIPTION                                                           */
35 /*                                                                        */
36 /*    This file defines the NetX Web Hypertext Transfer Protocol (HTTP)   */
37 /*    component, including all data types and external references.        */
38 /*    It is assumed that nx_api.h and nx_port.h have already been         */
39 /*    included, along with fx_api.h and fx_port.h.                        */
40 /*                                                                        */
41 /*  RELEASE HISTORY                                                       */
42 /*                                                                        */
43 /*    DATE              NAME                      DESCRIPTION             */
44 /*                                                                        */
45 /*  05-19-2020     Yuxin Zhou               Initial Version 6.0           */
46 /*  09-30-2020     Yuxin Zhou               Modified comment(s),          */
47 /*                                            resulting in version 6.1    */
48 /*  04-02-2021     Yuxin Zhou               Modified comment(s), and      */
49 /*                                            improved the logic of       */
50 /*                                            parsing base64,             */
51 /*                                            resulting in version 6.1.6  */
52 /*                                                                        */
53 /**************************************************************************/
54 
55 #ifndef NX_WEB_HTTP_CLIENT_H
56 #define NX_WEB_HTTP_CLIENT_H
57 
58 /* Determine if a C++ compiler is being used.  If so, ensure that standard
59    C is used to process the API information.  */
60 
61 
62 #ifdef   __cplusplus
63 
64 /* Yes, C++ compiler is present.  Use standard C.  */
65 extern   "C" {
66 
67 #endif
68 
69 #include    "nx_api.h"
70 
71 /* Include common HTTP definitions. */
72 #include "nx_web_http_common.h"
73 
74 /* Define the HTTP ID.  */
75 #define NX_WEB_HTTP_CLIENT_ID                  0x48545450UL
76 
77 #ifndef NX_WEB_HTTP_CLIENT_TIMEOUT
78 #define NX_WEB_HTTP_CLIENT_TIMEOUT              (10 * NX_IP_PERIODIC_RATE)
79 #endif
80 
81 #ifndef NX_WEB_HTTP_CLIENT_MIN_PACKET_SIZE
82 #define NX_WEB_HTTP_CLIENT_MIN_PACKET_SIZE      600
83 #endif
84 
85 /* Define HTTP Client states.  */
86 
87 #define NX_WEB_HTTP_CLIENT_STATE_READY          1
88 #define NX_WEB_HTTP_CLIENT_STATE_GET            2
89 #define NX_WEB_HTTP_CLIENT_STATE_PUT            3
90 #define NX_WEB_HTTP_CLIENT_STATE_POST           4
91 #define NX_WEB_HTTP_CLIENT_STATE_HEAD           5
92 #define NX_WEB_HTTP_CLIENT_STATE_DELETE         6
93 
94 #ifdef  NX_WEB_HTTP_DIGEST_ENABLE
95 
96 /* Include the MD5 digest header file.  */
97 
98 #include "nx_md5.h"
99 
100 #endif
101 
102 
103 #ifdef NX_WEB_HTTPS_ENABLE
104 #include "nx_secure_tls_api.h"
105 #endif
106 
107 /* Define the */
108 typedef struct NX_WEB_HTTP_CLIENT_STATUS_MAP_STRUCT
109 {
110     CHAR           *nx_web_http_client_status_string;              /* String of status    */
111     UINT           nx_web_http_client_status_code;                 /* Status code         */
112 } NX_WEB_HTTP_CLIENT_STATUS_MAP;
113 
114 /* Define the HTTP Client data structure.  */
115 
116 typedef struct NX_WEB_HTTP_CLIENT_STRUCT
117 {
118     ULONG           nx_web_http_client_id;                              /* HTTP Server ID                       */
119     CHAR           *nx_web_http_client_name;                            /* Name of this HTTP Client             */
120     UINT            nx_web_http_client_state;                           /* Current state of HTTP Client         */
121     UINT            nx_web_http_client_connect_port;                    /* Client port to connect to the server */
122     NX_IP          *nx_web_http_client_ip_ptr;                          /* Pointer to associated IP structure   */
123     NX_PACKET_POOL *nx_web_http_client_packet_pool_ptr;                 /* Pointer to HTTP Client packet pool   */
124     ULONG           nx_web_http_client_total_transfer_bytes;            /* Total number of bytes to transfer    */
125     ULONG           nx_web_http_client_actual_bytes_transferred;        /* Number of bytes actually transferred */
126     ULONG           nx_web_http_client_total_receive_bytes;             /* Total number of bytes to receive     */
127     ULONG           nx_web_http_client_actual_bytes_received;           /* Number of bytes actually received    */
128     NX_TCP_SOCKET   nx_web_http_client_socket;                          /* HTTP Client TCP socket               */
129     NXD_ADDRESS     nx_web_http_client_server_address;                  /* IP address of remote server          */
130     NX_PACKET      *nx_web_http_client_request_packet_ptr;              /* Pointer to current request packet    */
131     UINT            nx_web_http_client_method;                          /* Current method (e.g. GET, PUT)       */
132 #ifndef NX_WEB_HTTP_KEEPALIVE_DISABLE
133     UCHAR           nx_web_http_client_keep_alive;                      /* Flag of keep alive                   */
134 #else
135     UCHAR           nx_web_http_client_reserved;                        /* Reserved                             */
136 #endif /* NX_WEB_HTTP_KEEPALIVE_DISABLE */
137     UCHAR           nx_web_http_client_response_header_received;        /* Flag of response header received     */
138     UCHAR           nx_web_http_client_request_chunked;                 /* Flag for chunked request             */
139     UCHAR           nx_web_http_client_response_chunked;                /* Flag for chunked response            */
140     UINT            nx_web_http_client_chunked_response_remaining_size; /* Remaining size of the response       */
141     NX_PACKET      *nx_web_http_client_response_packet;                 /* Pointer to the received response     */
142     /* Pointer to application callback invoked for each field in the response header. */
143     VOID          (*nx_web_http_client_response_callback)(struct NX_WEB_HTTP_CLIENT_STRUCT *client_ptr,
144                                                           CHAR *field_name, UINT field_name_length,
145                                                           CHAR *field_value, UINT field_value_length);
146 #ifdef NX_WEB_HTTPS_ENABLE
147     UINT                  nx_web_http_client_is_https;                  /* If using TLS for HTTPS, set to true. */
148     NX_SECURE_TLS_SESSION nx_web_http_client_tls_session;                      /* TLS session for HTTPS.               */
149 #endif
150 #ifdef  NX_WEB_HTTP_DIGEST_ENABLE
151     NX_MD5          nx_web_http_client_md5data;                         /* HTTP Client MD5 work area            */
152 #endif
153 } NX_WEB_HTTP_CLIENT;
154 
155 
156 
157 #ifndef NX_WEB_HTTP_CLIENT_SOURCE_CODE
158 
159 /* Application caller is present, perform API mapping.  */
160 
161 /* Determine if error checking is desired.  If so, map API functions
162    to the appropriate error checking front-ends.  Otherwise, map API
163    functions to the core functions that actually perform the work.
164    Note: error checking is enabled by default.  */
165 
166 #ifdef NX_DISABLE_ERROR_CHECKING
167 
168 /* Services without error checking.  */
169 
170 #define nx_web_http_client_create                       _nx_web_http_client_create
171 #define nx_web_http_client_delete                       _nx_web_http_client_delete
172 #define nx_web_http_client_get_start                    _nx_web_http_client_get_start
173 #define nx_web_http_client_get_start_extended           _nx_web_http_client_get_start_extended
174 #define nx_web_http_client_put_start                    _nx_web_http_client_put_start
175 #define nx_web_http_client_put_start_extended           _nx_web_http_client_put_start_extended
176 #define nx_web_http_client_post_start                   _nx_web_http_client_post_start
177 #define nx_web_http_client_post_start_extended          _nx_web_http_client_post_start_extended
178 #define nx_web_http_client_head_start                   _nx_web_http_client_head_start
179 #define nx_web_http_client_head_start_extended          _nx_web_http_client_head_start_extended
180 #define nx_web_http_client_delete_start                 _nx_web_http_client_delete_start
181 #define nx_web_http_client_delete_start_extended        _nx_web_http_client_delete_start_extended
182 #define nx_web_http_client_get_secure_start             _nx_web_http_client_get_secure_start
183 #define nx_web_http_client_get_secure_start_extended    _nx_web_http_client_get_secure_start_extended
184 #define nx_web_http_client_put_secure_start             _nx_web_http_client_put_secure_start
185 #define nx_web_http_client_put_secure_start_extended    _nx_web_http_client_put_secure_start_extended
186 #define nx_web_http_client_post_secure_start            _nx_web_http_client_post_secure_start
187 #define nx_web_http_client_post_secure_start_extended   _nx_web_http_client_post_secure_start_extended
188 #define nx_web_http_client_head_secure_start            _nx_web_http_client_head_secure_start
189 #define nx_web_http_client_head_secure_start_extended   _nx_web_http_client_head_secure_start_extended
190 #define nx_web_http_client_delete_secure_start          _nx_web_http_client_delete_secure_start
191 #define nx_web_http_client_delete_secure_start_extended _nx_web_http_client_delete_secure_start_extended
192 #define nx_web_http_client_response_body_get            _nx_web_http_client_response_body_get
193 #define nx_web_http_client_put_packet                   _nx_web_http_client_put_packet
194 #define nx_web_http_client_response_header_callback_set _nx_web_http_client_response_header_callback_set
195 #define nx_web_http_client_request_initialize           _nx_web_http_client_request_initialize
196 #define nx_web_http_client_request_initialize_extended  _nx_web_http_client_request_initialize_extended
197 #define nx_web_http_client_request_send                 _nx_web_http_client_request_send
198 #define nx_web_http_client_request_header_add           _nx_web_http_client_request_header_add
199 #define nx_web_http_client_connect                      _nx_web_http_client_connect
200 #define nx_web_http_client_secure_connect               _nx_web_http_client_secure_connect
201 #define nx_web_http_client_request_packet_allocate      _nx_web_http_client_request_packet_allocate
202 #define nx_web_http_client_request_packet_send          _nx_web_http_client_request_packet_send
203 #define nx_web_http_client_request_chunked_set          _nx_web_http_client_request_chunked_set
204 
205 #else
206 
207 /* Services with error checking.  */
208 
209 #define nx_web_http_client_create(p,n,i,pp,w)           _nxe_web_http_client_create(p,n,i,pp,w, sizeof(NX_WEB_HTTP_CLIENT))
210 #define nx_web_http_client_delete                       _nxe_web_http_client_delete
211 #define nx_web_http_client_get_start                    _nxe_web_http_client_get_start
212 #define nx_web_http_client_get_start_extended           _nxe_web_http_client_get_start_extended
213 #define nx_web_http_client_put_start                    _nxe_web_http_client_put_start
214 #define nx_web_http_client_put_start_extended           _nxe_web_http_client_put_start_extended
215 #define nx_web_http_client_post_start                   _nxe_web_http_client_post_start
216 #define nx_web_http_client_post_start_extended          _nx_web_http_client_post_start_extended
217 #define nx_web_http_client_head_start                   _nxe_web_http_client_head_start
218 #define nx_web_http_client_head_start_extended          _nxe_web_http_client_head_start_extended
219 #define nx_web_http_client_delete_start                 _nxe_web_http_client_delete_start
220 #define nx_web_http_client_delete_start_extended        _nxe_web_http_client_delete_start_extended
221 #define nx_web_http_client_get_secure_start             _nxe_web_http_client_get_secure_start
222 #define nx_web_http_client_get_secure_start_extended    _nxe_web_http_client_get_secure_start_extended
223 #define nx_web_http_client_put_secure_start             _nxe_web_http_client_put_secure_start
224 #define nx_web_http_client_put_secure_start_extended    _nxe_web_http_client_put_secure_start_extended
225 #define nx_web_http_client_post_secure_start            _nxe_web_http_client_post_secure_start
226 #define nx_web_http_client_post_secure_start_extended   _nxe_web_http_client_post_secure_start_extended
227 #define nx_web_http_client_head_secure_start            _nxe_web_http_client_head_secure_start
228 #define nx_web_http_client_head_secure_start_extended   _nxe_web_http_client_head_secure_start_extended
229 #define nx_web_http_client_delete_secure_start          _nxe_web_http_client_delete_secure_start
230 #define nx_web_http_client_delete_secure_start_extended _nxe_web_http_client_delete_secure_start_extended
231 #define nx_web_http_client_response_body_get            _nxe_web_http_client_response_body_get
232 #define nx_web_http_client_put_packet                   _nxe_web_http_client_put_packet
233 #define nx_web_http_client_response_header_callback_set _nxe_web_http_client_response_header_callback_set
234 #define nx_web_http_client_request_initialize           _nxe_web_http_client_request_initialize
235 #define nx_web_http_client_request_initialize_extended  _nxe_web_http_client_request_initialize_extended
236 #define nx_web_http_client_request_send                 _nxe_web_http_client_request_send
237 #define nx_web_http_client_request_header_add           _nxe_web_http_client_request_header_add
238 #define nx_web_http_client_connect                      _nxe_web_http_client_connect
239 #define nx_web_http_client_secure_connect               _nxe_web_http_client_secure_connect
240 #define nx_web_http_client_request_packet_allocate      _nxe_web_http_client_request_packet_allocate
241 #define nx_web_http_client_request_packet_send          _nxe_web_http_client_request_packet_send
242 #define nx_web_http_client_request_chunked_set          _nxe_web_http_client_request_chunked_set
243 
244 #endif  /* NX_DISABLE_ERROR_CHECKING */
245 
246 /* Define the prototypes accessible to the application software.  */
247 
248 
249 #ifdef NX_DISABLE_ERROR_CHECKING
250 UINT        _nx_web_http_client_create(NX_WEB_HTTP_CLIENT *client_ptr, CHAR *client_name, NX_IP *ip_ptr, NX_PACKET_POOL *pool_ptr, ULONG window_size);
251 #else
252 UINT        _nxe_web_http_client_create(NX_WEB_HTTP_CLIENT *client_ptr, CHAR *client_name, NX_IP *ip_ptr, NX_PACKET_POOL *pool_ptr, ULONG window_size, UINT http_client_size);
253 #endif  /* NX_DISABLE_ERROR_CHECKING */
254 
255 
256 UINT        nx_web_http_client_delete(NX_WEB_HTTP_CLIENT *client_ptr);
257 UINT        nx_web_http_client_response_body_get(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET **packet_ptr, ULONG wait_option);
258 UINT        nx_web_http_client_put_packet(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET *packet_ptr, ULONG wait_option);
259 UINT        nx_web_http_client_get_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG wait_option);
260 UINT        nx_web_http_client_get_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
261                                                   CHAR *username, UINT username_length, CHAR *password, UINT password_length, ULONG wait_option);
262 UINT        nx_web_http_client_put_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG total_bytes, ULONG wait_option);
263 UINT        nx_web_http_client_put_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
264                                                   CHAR *username, UINT username_length, CHAR *password, UINT password_length, ULONG total_bytes, ULONG wait_option);
265 UINT        nx_web_http_client_post_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG total_bytes, ULONG wait_option);
266 UINT        nx_web_http_client_post_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
267                                                    CHAR *username, UINT username_length, CHAR *password, UINT password_length, ULONG total_bytes, ULONG wait_option);
268 UINT        nx_web_http_client_head_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG wait_option);
269 UINT        nx_web_http_client_head_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
270                                                    CHAR *username, UINT username_length, CHAR *password, UINT password_length, ULONG wait_option);
271 UINT        nx_web_http_client_delete_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG wait_option);
272 UINT        nx_web_http_client_delete_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
273                                                      CHAR *username, UINT username_length, CHAR *password, UINT password_length, ULONG wait_option);
274 
275 UINT        nx_web_http_client_response_header_callback_set(NX_WEB_HTTP_CLIENT *client_ptr,
276                                                             VOID (*callback_function)(NX_WEB_HTTP_CLIENT *client_ptr,
277                                                             CHAR *field_name,
278                                                             UINT field_name_length,
279                                                             CHAR *field_value,
280                                                             UINT field_value_length));
281 
282 UINT        nx_web_http_client_connect(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, ULONG wait_option);
283 
284 UINT        nx_web_http_client_request_initialize(NX_WEB_HTTP_CLIENT *client_ptr,
285                                                   UINT method,
286                                                   CHAR *resource,
287                                                   CHAR *host,
288                                                   UINT input_size,
289                                                   UINT transfer_encoding_chunked,
290                                                   CHAR *username,
291                                                   CHAR *password,
292                                                   UINT wait_option);
293 
294 UINT        nx_web_http_client_request_initialize_extended(NX_WEB_HTTP_CLIENT *client_ptr,
295                                                            UINT method,
296                                                            CHAR *resource,
297                                                            UINT resource_length,
298                                                            CHAR *host,
299                                                            UINT host_length,
300                                                            UINT input_size,
301                                                            UINT transfer_encoding_chunked,
302                                                            CHAR *username,
303                                                            UINT username_length,
304                                                            CHAR *password,
305                                                            UINT password_length,
306                                                            UINT wait_option);
307 
308 UINT        nx_web_http_client_request_packet_allocate(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET **packet_ptr,
309                                                        UINT wait_option);
310 
311 UINT        nx_web_http_client_request_header_add(NX_WEB_HTTP_CLIENT *client_ptr, CHAR *field_name, UINT name_length,
312                                                   CHAR *field_value, UINT value_length, UINT wait_option);
313 
314 UINT        nx_web_http_client_request_send(NX_WEB_HTTP_CLIENT *client_ptr, ULONG wait_option);
315 
316 UINT        nx_web_http_client_request_packet_send(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET *packet_ptr, UINT more_data, ULONG wait_option);
317 
318 UINT        nx_web_http_client_request_chunked_set(NX_WEB_HTTP_CLIENT *client_ptr, UINT chunk_size, NX_PACKET *packet_ptr);
319 
320 #ifdef NX_WEB_HTTPS_ENABLE
321 
322 UINT        nx_web_http_client_secure_connect(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
323                                               UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
324                                               ULONG wait_option);
325 
326 UINT        nx_web_http_client_get_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
327                                                 CHAR *host, CHAR *username, CHAR *password,
328                                                 UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
329                                                 ULONG wait_option);
330 UINT        nx_web_http_client_get_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
331                                                          CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
332                                                          CHAR *username, UINT username_length, CHAR *password, UINT password_length,
333                                                          UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
334                                                          ULONG wait_option);
335 UINT        nx_web_http_client_put_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
336                                                 CHAR *host, CHAR *username, CHAR *password, ULONG total_bytes,
337                                                 UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
338                                                 ULONG wait_option);
339 UINT        nx_web_http_client_put_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
340                                                          CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
341                                                          CHAR *username, UINT username_length, CHAR *password, UINT password_length, ULONG total_bytes,
342                                                          UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
343                                                          ULONG wait_option);
344 UINT        nx_web_http_client_post_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
345                                                  CHAR *host, CHAR *username, CHAR *password, ULONG total_bytes,
346                                                  UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
347                                                  ULONG wait_option);
348 UINT        nx_web_http_client_post_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
349                                                           CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
350                                                           CHAR *username, UINT username_length, CHAR *password, UINT password_length, ULONG total_bytes,
351                                                           UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
352                                                           ULONG wait_option);
353 UINT        nx_web_http_client_head_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
354                                                  CHAR *host, CHAR *username, CHAR *password,
355                                                  UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
356                                                  ULONG wait_option);
357 UINT        nx_web_http_client_head_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
358                                                           CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
359                                                           CHAR *username, UINT username_length, CHAR *password, UINT password_length,
360                                                           UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
361                                                           ULONG wait_option);
362 UINT        nx_web_http_client_delete_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
363                                                    CHAR *host, CHAR *username, CHAR *password,
364                                                    UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
365                                                    ULONG wait_option);
366 UINT        nx_web_http_client_delete_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
367                                                             CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
368                                                             CHAR *username, UINT username_length, CHAR *password, UINT password_length,
369                                                             UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
370                                                             ULONG wait_option);
371 
372 #endif
373 #else
374 
375 /* HTTP source code is being compiled, do not perform any API mapping.  */
376 
377 UINT        _nxe_web_http_client_create(NX_WEB_HTTP_CLIENT *client_ptr, CHAR *client_name, NX_IP *ip_ptr, NX_PACKET_POOL *pool_ptr, ULONG window_size, UINT http_client_size);
378 UINT        _nx_web_http_client_create(NX_WEB_HTTP_CLIENT *client_ptr, CHAR *client_name, NX_IP *ip_ptr, NX_PACKET_POOL *pool_ptr, ULONG window_size);
379 UINT        _nxe_web_http_client_delete(NX_WEB_HTTP_CLIENT *client_ptr);
380 UINT        _nx_web_http_client_delete(NX_WEB_HTTP_CLIENT *client_ptr);
381 UINT        _nxe_web_http_client_response_body_get(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET **packet_ptr, ULONG wait_option);
382 UINT        _nx_web_http_client_response_body_get(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET **packet_ptr, ULONG wait_option);
383 UINT        _nxe_web_http_client_put_packet(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET *packet_ptr, ULONG wait_option);
384 UINT        _nx_web_http_client_put_packet(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET *packet_ptr, ULONG wait_option);
385 UINT        _nxe_web_http_client_get_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG wait_option);
386 UINT        _nx_web_http_client_get_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG wait_option);
387 UINT        _nxe_web_http_client_get_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip,
388                                                     UINT server_port, CHAR *resource, UINT resource_length,
389                                                     CHAR *host, UINT host_length, CHAR *username,
390                                                     UINT username_length, CHAR *password,
391                                                     UINT password_length, ULONG wait_option);
392 UINT        _nx_web_http_client_get_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip,
393                                                    UINT server_port, CHAR *resource, UINT resource_length,
394                                                    CHAR *host, UINT host_length, CHAR *username,
395                                                    UINT username_length, CHAR *password,
396                                                    UINT password_length, ULONG wait_option);
397 UINT        _nxe_web_http_client_put_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG total_bytes, ULONG wait_option);
398 UINT        _nx_web_http_client_put_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG total_bytes, ULONG wait_option);
399 UINT        _nxe_web_http_client_put_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip,
400                                                     UINT server_port, CHAR *resource, UINT resource_length,
401                                                     CHAR *host, UINT host_length, CHAR *username,
402                                                     UINT username_length, CHAR *password,
403                                                     UINT password_length, ULONG total_bytes,
404                                                     ULONG wait_option);
405 UINT        _nx_web_http_client_put_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip,
406                                                    UINT server_port, CHAR *resource, UINT resource_length,
407                                                    CHAR *host, UINT host_length, CHAR *username,
408                                                    UINT username_length, CHAR *password,
409                                                    UINT password_length, ULONG total_bytes,
410                                                    ULONG wait_option);
411 UINT        _nxe_web_http_client_post_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG total_bytes, ULONG wait_option);
412 UINT        _nx_web_http_client_post_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG total_bytes, ULONG wait_option);
413 UINT        _nxe_web_http_client_post_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip,
414                                                      UINT server_port, CHAR *resource, UINT resource_length,
415                                                      CHAR *host, UINT host_length, CHAR *username,
416                                                      UINT username_length, CHAR *password,
417                                                      UINT password_length, ULONG total_bytes,
418                                                      ULONG wait_option);
419 UINT        _nx_web_http_client_post_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip,
420                                                     UINT server_port, CHAR *resource, UINT resource_length,
421                                                     CHAR *host, UINT host_length, CHAR *username,
422                                                     UINT username_length, CHAR *password,
423                                                     UINT password_length, ULONG total_bytes,
424                                                     ULONG wait_option);
425 UINT        _nxe_web_http_client_head_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG wait_option);
426 UINT        _nx_web_http_client_head_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG wait_option);
427 UINT        _nxe_web_http_client_head_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip,
428                                                      UINT server_port, CHAR *resource, UINT resource_length,
429                                                      CHAR *host, UINT host_length, CHAR *username,
430                                                      UINT username_length, CHAR *password,
431                                                      UINT password_length, ULONG wait_option);
432 UINT        _nx_web_http_client_head_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip,
433                                                     UINT server_port, CHAR *resource, UINT resource_length,
434                                                     CHAR *host, UINT host_length, CHAR *username,
435                                                     UINT username_length, CHAR *password,
436                                                     UINT password_length, ULONG wait_option);
437 UINT        _nxe_web_http_client_delete_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG wait_option);
438 UINT        _nx_web_http_client_delete_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource, CHAR *host, CHAR *username, CHAR *password, ULONG wait_option);
439 UINT        _nxe_web_http_client_delete_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip,
440                                                        UINT server_port, CHAR *resource, UINT resource_length,
441                                                        CHAR *host, UINT host_length, CHAR *username,
442                                                        UINT username_length, CHAR *password,
443                                                        UINT password_length, ULONG wait_option);
444 UINT        _nx_web_http_client_delete_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip,
445                                                       UINT server_port, CHAR *resource, UINT resource_length,
446                                                       CHAR *host, UINT host_length, CHAR *username,
447                                                       UINT username_length, CHAR *password,
448                                                       UINT password_length, ULONG wait_option);
449 
450 
451 UINT        _nxe_web_http_client_response_header_callback_set(NX_WEB_HTTP_CLIENT *client_ptr,
452                                                               VOID (*callback_function)(NX_WEB_HTTP_CLIENT *client_ptr,
453                                                               CHAR *field_name,
454                                                               UINT field_name_length,
455                                                               CHAR *field_value,
456                                                               UINT field_value_length));
457 UINT        _nx_web_http_client_response_header_callback_set(NX_WEB_HTTP_CLIENT *client_ptr,
458                                                              VOID (*callback_function)(NX_WEB_HTTP_CLIENT *client_ptr,
459                                                              CHAR *field_name,
460                                                              UINT field_name_length,
461                                                              CHAR *field_value,
462                                                              UINT field_value_length));
463 UINT        _nx_web_http_client_connect(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, ULONG wait_option);
464 UINT        _nxe_web_http_client_connect(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, ULONG wait_option);
465 UINT        _nx_web_http_client_request_initialize(NX_WEB_HTTP_CLIENT *client_ptr,
466                                                    UINT method,
467                                                    CHAR *resource,
468                                                    CHAR *host,
469                                                    UINT input_size,
470                                                    UINT transfer_encoding_chunked,
471                                                    CHAR *username,
472                                                    CHAR *password,
473                                                    UINT wait_option);
474 UINT        _nxe_web_http_client_request_initialize(NX_WEB_HTTP_CLIENT *client_ptr,
475                                                     UINT method,
476                                                     CHAR *resource,
477                                                     CHAR *host,
478                                                     UINT input_size,
479                                                     UINT transfer_encoding_chunked,
480                                                     CHAR *username,
481                                                     CHAR *password,
482                                                     UINT wait_option);
483 UINT        _nx_web_http_client_request_initialize_extended(NX_WEB_HTTP_CLIENT *client_ptr,
484                                                             UINT method,
485                                                             CHAR *resource,
486                                                             UINT resource_length,
487                                                             CHAR *host,
488                                                             UINT host_length,
489                                                             UINT input_size,
490                                                             UINT transfer_encoding_chunked,
491                                                             CHAR *username,
492                                                             UINT username_length,
493                                                             CHAR *password,
494                                                             UINT password_length,
495                                                             UINT wait_option);
496 UINT        _nxe_web_http_client_request_initialize_extended(NX_WEB_HTTP_CLIENT *client_ptr,
497                                                              UINT method,
498                                                              CHAR *resource,
499                                                              UINT resource_length,
500                                                              CHAR *host,
501                                                              UINT host_length,
502                                                              UINT input_size,
503                                                              UINT transfer_encoding_chunked,
504                                                              CHAR *username,
505                                                              UINT username_length,
506                                                              CHAR *password,
507                                                              UINT password_length,
508                                                              UINT wait_option);
509 
510 
511 UINT        _nx_web_http_client_request_send(NX_WEB_HTTP_CLIENT *client_ptr, ULONG wait_option);
512 UINT        _nxe_web_http_client_request_send(NX_WEB_HTTP_CLIENT *client_ptr, ULONG wait_option);
513 UINT        _nx_web_http_client_request_packet_allocate(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET **packet_ptr,
514                                                         UINT wait_option);
515 UINT        _nxe_web_http_client_request_packet_allocate(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET **packet_ptr,
516                                                          UINT wait_option);
517 
518 UINT        _nx_web_http_client_request_header_add(NX_WEB_HTTP_CLIENT *client_ptr, CHAR *field_name, UINT name_length,
519                                                    CHAR *field_value, UINT value_length, UINT wait_option);
520 UINT        _nxe_web_http_client_request_header_add(NX_WEB_HTTP_CLIENT *client_ptr, CHAR *field_name, UINT name_length,
521                                                     CHAR *field_value, UINT value_length, UINT wait_option);
522 
523 UINT        _nx_web_http_client_request_packet_send(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET *packet_ptr, UINT more_data, ULONG wait_option);
524 UINT        _nxe_web_http_client_request_packet_send(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET *packet_ptr, UINT more_data, ULONG wait_option);
525 
526 UINT        _nx_web_http_client_request_chunked_set(NX_WEB_HTTP_CLIENT *client_ptr, UINT chunk_size, NX_PACKET *packet_ptr);
527 UINT        _nxe_web_http_client_request_chunked_set(NX_WEB_HTTP_CLIENT *client_ptr, UINT chunk_size, NX_PACKET *packet_ptr);
528 
529 #ifdef NX_WEB_HTTPS_ENABLE
530 UINT        _nx_web_http_client_secure_connect(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
531                                                UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
532                                                ULONG wait_option);
533 UINT        _nxe_web_http_client_secure_connect(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
534                                                 UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
535                                                 ULONG wait_option);
536 UINT        _nxe_web_http_client_get_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
537                                                   CHAR *host, CHAR *username, CHAR *password,
538                                                   UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
539                                                   ULONG wait_option);
540 UINT        _nx_web_http_client_get_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
541                                                  CHAR *host, CHAR *username, CHAR *password,
542                                                  UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
543                                                  ULONG wait_option);
544 UINT        _nxe_web_http_client_get_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
545                                                            CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
546                                                            CHAR *username, UINT username_length, CHAR *password, UINT password_length,
547                                                            UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
548                                                            ULONG wait_option);
549 UINT        _nx_web_http_client_get_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
550                                                           CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
551                                                           CHAR *username, UINT username_length, CHAR *password, UINT password_length,
552                                                           UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
553                                                           ULONG wait_option);
554 UINT        _nxe_web_http_client_put_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
555                                                   CHAR *host, CHAR *username, CHAR *password, ULONG total_bytes,
556                                                   UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
557                                                   ULONG wait_option);
558 UINT        _nx_web_http_client_put_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
559                                                  CHAR *host, CHAR *username, CHAR *password, ULONG total_bytes,
560                                                  UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
561                                                  ULONG wait_option);
562 UINT        _nxe_web_http_client_put_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
563                                                            CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
564                                                            CHAR *username, UINT username_length, CHAR *password, UINT password_length, ULONG total_bytes,
565                                                            UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
566                                                            ULONG wait_option);
567 UINT        _nx_web_http_client_put_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
568                                                           CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
569                                                           CHAR *username, UINT username_length, CHAR *password, UINT password_length, ULONG total_bytes,
570                                                           UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
571                                                           ULONG wait_option);
572 UINT        _nxe_web_http_client_post_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
573                                                    CHAR *host, CHAR *username, CHAR *password, ULONG total_bytes,
574                                                    UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
575                                                    ULONG wait_option);
576 UINT        _nx_web_http_client_post_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
577                                                   CHAR *host, CHAR *username, CHAR *password, ULONG total_bytes,
578                                                   UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
579                                                   ULONG wait_option);
580 UINT        _nxe_web_http_client_post_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
581                                                             CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
582                                                             CHAR *username, UINT username_length, CHAR *password, UINT password_length, ULONG total_bytes,
583                                                             UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
584                                                             ULONG wait_option);
585 UINT        _nx_web_http_client_post_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
586                                                            CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
587                                                            CHAR *username, UINT username_length, CHAR *password, UINT password_length, ULONG total_bytes,
588                                                            UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
589                                                            ULONG wait_option);
590 
591 UINT        _nxe_web_http_client_head_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
592                                                 CHAR *host, CHAR *username, CHAR *password,
593                                                 UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
594                                                 ULONG wait_option);
595 UINT        _nx_web_http_client_head_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
596                                                 CHAR *host, CHAR *username, CHAR *password,
597                                                 UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
598                                                 ULONG wait_option);
599 UINT        _nxe_web_http_client_head_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
600                                                             CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
601                                                             CHAR *username, UINT username_length, CHAR *password, UINT password_length,
602                                                             UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
603                                                             ULONG wait_option);
604 UINT        _nx_web_http_client_head_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
605                                                            CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
606                                                            CHAR *username, UINT username_length, CHAR *password, UINT password_length,
607                                                            UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
608                                                            ULONG wait_option);
609 UINT        _nxe_web_http_client_delete_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
610                                                 CHAR *host, CHAR *username, CHAR *password,
611                                                 UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
612                                                 ULONG wait_option);
613 UINT        _nx_web_http_client_delete_secure_start(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port, CHAR *resource,
614                                                 CHAR *host, CHAR *username, CHAR *password,
615                                                 UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
616                                                 ULONG wait_option);
617 UINT        _nxe_web_http_client_delete_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
618                                                               CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
619                                                               CHAR *username, UINT username_length, CHAR *password, UINT password_length,
620                                                               UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
621                                                               ULONG wait_option);
622 UINT        _nx_web_http_client_delete_secure_start_extended(NX_WEB_HTTP_CLIENT *client_ptr, NXD_ADDRESS *server_ip, UINT server_port,
623                                                              CHAR *resource, UINT resource_length, CHAR *host, UINT host_length,
624                                                              CHAR *username, UINT username_length, CHAR *password, UINT password_length,
625                                                              UINT (*tls_setup)(NX_WEB_HTTP_CLIENT *client_ptr, NX_SECURE_TLS_SESSION *),
626                                                              ULONG wait_option);
627 
628 
629 
630 #endif
631 
632 /* Define internal HTTP functions.  */
633 
634 UINT        _nx_web_http_client_type_get(CHAR *name, CHAR *http_type_string);
635 UINT        _nx_web_http_client_content_length_get(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET *packet_ptr);
636 UINT        _nx_web_http_client_process_header_fields(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET *packet_ptr);
637 UINT        _nx_web_http_client_number_convert(UINT number, CHAR *string);
638 UINT        _nx_web_http_client_content_type_header_add(NX_WEB_HTTP_CLIENT *client_ptr, CHAR *resource, ULONG wait_option);
639 UINT        _nx_web_http_client_content_length_header_add(NX_WEB_HTTP_CLIENT *client_ptr, ULONG total_bytes, ULONG wait_option);
640 VOID        _nx_web_http_client_error_exit(NX_WEB_HTTP_CLIENT *client_ptr, UINT wait_option);
641 UINT        _nx_web_http_client_receive(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET **packet_ptr, ULONG wait_option);
642 UINT        _nx_web_http_client_send(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET *packet_ptr, ULONG wait_option);
643 UINT        _nx_web_http_client_get_server_response(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET **packet_ptr, ULONG wait_option);
644 VOID        _nx_web_http_client_cleanup(NX_WEB_HTTP_CLIENT *client_ptr);
645 UINT        _nx_web_http_client_memicmp(UCHAR *src, ULONG src_length, UCHAR *dest, ULONG dest_length);
646 UINT        _nx_web_http_client_response_read(NX_WEB_HTTP_CLIENT *client_ptr, UCHAR *data, ULONG wait_option, NX_PACKET **current_packet_pptr, UCHAR **current_data_pptr);
647 UINT        _nx_web_http_client_response_byte_expect(NX_WEB_HTTP_CLIENT *client_ptr, UCHAR data, ULONG wait_option, NX_PACKET **current_packet_pptr, UCHAR **current_data_pptr);
648 UINT        _nx_web_http_client_chunked_size_get(NX_WEB_HTTP_CLIENT *client_ptr, UINT *chunk_size, ULONG wait_option, NX_PACKET **current_packet_pptr, UCHAR **current_data_pptr);
649 UINT        _nx_web_http_client_response_chunked_get(NX_WEB_HTTP_CLIENT *client_ptr, NX_PACKET **packet_pptr, ULONG wait_option);
650 
651 #endif  /* NX_WEB_HTTP_CLIENT_SOURCE_CODE */
652 
653 /* Determine if a C++ compiler is being used.  If so, complete the standard
654    C conditional started above.  */
655 #ifdef   __cplusplus
656         }
657 #endif
658 
659 #endif  /* NX_WEB_HTTP_CLIENT_H */
660