|
Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
|
Implements native HTTP response writing helpers. More...
#include "native_http_response.h"#include <stdarg.h>#include <stdio.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Functions | |
| int | native_connection_printf (NativeConnection *connection, const char *format,...) |
| Writes formatted bytes to a native connection. | |
| void | native_send_text_response (NativeConnection *connection, int status, const char *status_text, const char *body) |
| Sends a plain-text HTTP response with explicit content length. | |
Implements native HTTP response writing helpers.
Definition in file native_http_response.c.
| int native_connection_printf | ( | NativeConnection * | connection, |
| const char * | format, | ||
| ... ) |
Writes formatted bytes to a native connection.
| connection | Connection to write to. |
| format | printf-style format string. |
| ... | Format arguments. |
Definition at line 13 of file native_http_response.c.
References len, and native_connection_write().
Referenced by handle_action_route(), handle_page_route(), native_dynamic_media_serve_asset(), native_dynamic_runtime_handle_request(), native_send_text_response(), native_serve_static_file(), write_business_availability_api_response(), write_business_services_api_response(), write_generated_surface_schema_response(), write_html_response_with_headers_runtime(), write_json_error(), and write_proof_state_api_response().
| void native_send_text_response | ( | NativeConnection * | connection, |
| int | status, | ||
| const char * | status_text, | ||
| const char * | body ) |
Sends a plain-text HTTP response with explicit content length.
| connection | Connection to write to. |
| status | Numeric HTTP status code. |
| status_text | HTTP reason phrase. |
| body | Plain-text response body. |
Definition at line 40 of file native_http_response.c.
References native_connection_printf().
Referenced by accept_http_request_native(), handle_accept_invite_action_runtime(), handle_action_route(), handle_app_or_runtime_request(), handle_issue_business_invite_action_runtime(), handle_page_route(), handle_password_reset_complete_action_runtime(), handle_static_root_builtin_request(), native_dynamic_media_serve_asset(), native_dynamic_runtime_handle_request(), native_send_worker_pool_overload_response(), native_serve_static_file(), serve_dynamic_home_page(), serve_runtime_stack_native(), serve_single_app(), serve_static_root(), write_business_availability_api_response(), write_business_services_api_response(), write_generated_surface_schema_response(), write_html_response_with_headers_runtime(), write_json_error(), and write_proof_state_api_response().