Embedded TCP/IP stack  4.7.0

◆ fnet_http_srv_post_receive_t

typedef fnet_return_t(* fnet_http_srv_post_receive_t) (fnet_http_srv_session_t session, fnet_uint8_t *buffer, fnet_size_t buffer_size, fnet_uint32_t *cookie)

Callback function prototype of the POST-method receive function.

Parameters
bufferData buffer that contains data received from the remote HTTP client.
buffer_sizeSize of the input buffer in bytes.
cookieThis parameter points to the value, which can be used to associate a custom information with a connection instance. If application store context information in the cookie, it will be preserved for future calls for this request. This allows the application to associate some request-specific state.
Returns
This function must return:
See also
fnet_http_srv_post_t, fnet_http_srv_post_handle_t, fnet_http_srv_post_send_t

This function is invoked by the HTTP server when there is any data in the entity-body of the POST request. This function can be invoked multiple times to process all received data. At each invocation a new chunk of data must be processed. The HTTP server invokes this callback function after call of the fnet_http_srv_post_handle_t function.
If the HTTP server works according to HTTP/1.x (FNET_CFG_HTTP_SRV_VERSION_MAJOR is 1), this function may use fnet_http_srv_set_response_status_code() to change the default HTTP response status-code.

Definition at line 93 of file fnet_http_srv_post.h.


© 2005-2020 by Andrej Butok. http://fnet.sourceforge.net