net_http.h 621 B

123456789101112131415161718192021222324
  1. /**
  2. * @Author: 李建
  3. * @Date: 2023/12/13 17:58:01
  4. * @LastEditors: 李建
  5. * @LastEditTime: 2023/12/13 17:58:01
  6. * Description: http 请求
  7. * Copyright: Copyright (©)}) 2023 YXLJ@2024. All rights reserved.
  8. */
  9. #ifndef __NET_HTTP_CLIENT_H__
  10. #define __NET_HTTP_CLIENT_H__
  11. #include <stdio.h>
  12. #define BUFFER_SIZE_MAX 5000
  13. typedef void (* http_callback)(char* response, void * user_data);
  14. typedef struct {
  15. void *user_data;
  16. char *url;
  17. http_callback callback;
  18. } net_http_config_t;
  19. void net_http_post(const char * post_data, net_http_config_t callback);
  20. void net_http_get(net_http_config_t callback);
  21. #endif