Embedded TCP/IP stack: fnet_http_post_handle_t

FNET

typedef fnet_return_t(* fnet_http_post_handle_t) (fnet_http_session_t session, fnet_char_t *query, fnet_uint32_t *cookie)

Callback function prototype of the POST-method query handler.

Parameters
queryPOST-method query string (null-terminated).
The query string is set to whatever appears after the question mark in the URL itself.
cookieThis parameter points to the value, initially set to zero, 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_post, fnet_http_post_receive_t, fnet_http_post_send_t

The HTTP server invokes this callback function when gets POST-method request and the requested file name corresponds to the name registered in the POST table defined fnet_http_post.
If the query string does not have any data, the query will point to the blank string.
If the HTTP server works according to HTTP/1.x (FNET_CFG_HTTP_VERSION_MAJOR is 1), this function may use fnet_http_set_response_status_code() to change the default HTTP response status-code.

Definition at line 62 of file fnet_http_post.h.


© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net