pando_net_http.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*******************************************************
  2. * File name: pando_net_http.h
  3. * Author:Chongguang Li
  4. * Versions:0.0.1
  5. * Description: the http api
  6. * History:
  7. * 1.Date:
  8. * Author:
  9. * Modification:
  10. *********************************************************/
  11. #ifndef _PANDO_NET_HTTP_H_
  12. #define _PANDO_NET_HTTP_H_
  13. #include "pando_types.h"
  14. #define BUFFER_SIZE_MAX 5000
  15. typedef void (* http_callback)(char* response);
  16. /******************************************************************************
  17. * FunctionName : net_http_post
  18. * Description : the http post api.
  19. * Parameters : url: the url.
  20. * data: the post data.
  21. * http_cb: the specify function called after post successfully.
  22. * Returns : none
  23. *******************************************************************************/
  24. void net_http_post(const char* url, const char* data, http_callback http_cb);
  25. /******************************************************************************
  26. * FunctionName : net_http_get
  27. * Description : the http get api.
  28. * Parameters : url: the url.
  29. * http_cb: the specify function called after post successfully.
  30. * Returns : none
  31. *******************************************************************************/
  32. void net_http_get(const char* url, http_callback http_cb);
  33. #endif /* _PANDO_NET_HTTP_H_ */