Pharos
0.7.23
Modern Web Framework & Web App Hosting Service.
Toggle main menu visibility
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
*/
21
int
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
*/
26
void
cleanup_native_temp_body_file
(
char
**temp_body_path_io);
27
28
29
/** @} */
30
#endif
write_native_temp_body_file
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.
Definition
native_spawn_temp_body.c:35
cleanup_native_temp_body_file
void cleanup_native_temp_body_file(char **temp_body_path_io)
Removes a temporary request-body file and clears its stored path.
Definition
native_spawn_temp_body.c:61
src
native_runtime
c
native_spawn_temp_body.h
Generated by
1.17.0