Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
Loading...
Searching...
No Matches
native_spawn_temp_body.h
Go to the documentation of this file.
1/**
2 * @file
3 * @brief Declares temporary request-body file helpers.
4 */
5
6#ifndef PHAROS_NATIVE_SPAWN_TEMP_BODY_H
7#define PHAROS_NATIVE_SPAWN_TEMP_BODY_H
8
9#include <stddef.h>
10
11/** @name Temporary request-body helpers
12 * @{
13 */
14/**
15 * @brief Writes a request body to a temporary file for multipart request execution.
16 * @param body Request body bytes to persist.
17 * @param body_len Number of bytes in body.
18 * @param temp_body_path_out Destination for the allocated temp file path.
19 * @return 0 on success, or a non-zero status code on failure.
20 */
21int write_native_temp_body_file(const char *body, size_t body_len, char **temp_body_path_out);
22/**
23 * @brief Removes a temporary request-body file and clears its stored path.
24 * @param temp_body_path_io In-out pointer to the owned temp file path string.
25 */
26void cleanup_native_temp_body_file(char **temp_body_path_io);
27
28
29/** @} */
30#endif
int write_native_temp_body_file(const char *body, size_t body_len, char **temp_body_path_out)
Writes a request body to a temporary file for multipart request execution.
void cleanup_native_temp_body_file(char **temp_body_path_io)
Removes a temporary request-body file and clears its stored path.