mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-10 00:55:43 +00:00
http - add hprint128 - to simplify printing and sending to http response...
This commit is contained in:
@ -352,6 +352,17 @@ int poststr(http_request_t *request, const char *str){
|
||||
return postany(request, str, strlen(str));
|
||||
}
|
||||
|
||||
int hprintf128(http_request_t *request, const char *fmt, ...){
|
||||
va_list argList;
|
||||
BaseType_t taken;
|
||||
char tmp[128];
|
||||
va_start(argList, fmt);
|
||||
vsprintf(tmp, fmt, argList);
|
||||
va_end(argList);
|
||||
return postany(request, tmp, strlen(tmp));
|
||||
}
|
||||
|
||||
|
||||
int HTTP_ProcessPacket(http_request_t *request) {
|
||||
int i, j;
|
||||
char tmpA[128];
|
||||
|
||||
@ -39,6 +39,9 @@ int HTTP_ProcessPacket(http_request_t *request);
|
||||
void http_setup(http_request_t *request, const char *type);
|
||||
int poststr(http_request_t *request, const char *str);
|
||||
|
||||
// poststr with format - for results LESS THAN 128
|
||||
int hprintf128(http_request_t *request, const char *fmt, ...);
|
||||
|
||||
enum {
|
||||
HTTP_ANY = -1,
|
||||
HTTP_GET = 0,
|
||||
|
||||
Reference in New Issue
Block a user