stm32_ota/HARDWARE/LTE/EC20/ec20http.h

34 lines
1.5 KiB
C
Raw Permalink Normal View History

2023-12-15 06:28:06 +00:00
#ifndef _EC20HTTP_H
#define _EC20HTTP_H
#include "ec20net.h"
/*****************************************
*<EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
****************************************/
typedef struct
{
char *postBuf ; //HTTP<54><50><EFBFBD><EFBFBD> Header+Body<64><79>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Body<64><79>һ<EFBFBD><D2BB>%s<>޶<EFBFBD><DEB6><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>body<64>ֶθ<D6B6><CEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
char *host ; //HTTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
char *httpPort ; //HTTP<54><50><EFBFBD><EFBFBD><EFBFBD>Ľӿ<C4BD><D3BF><EFBFBD>
char *body ; //HTTP<54><50><EFBFBD><EFBFBD>body<64><79>ʽ
}POSTP_s ; //<2F><><EFBFBD><EFBFBD>POST<53><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ز<EFBFBD><D8B2><EFBFBD><EFBFBD>Ľṹ<C4BD><E1B9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/*****************************************
*<EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
****************************************/
RunResult EC20_SendHttpCmd( uint8_t cmdNum, char *format,... ) ; // EC20ͨ<30><CDA8><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD>HTTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
RunResult Http_Config(void) ; //HTTP<54><50><EFBFBD>ػ<EFBFBD><D8BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
RunResult Http_PDP_Init( void ) ; //EC20 HTTP context<78>ij<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>һ<EFBFBD>μ<EFBFBD><CEBC><EFBFBD>
RunResult Set_HttpURL(char *host) ; //<2F><><EFBFBD><EFBFBD>HTTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD>URL
void HttpErrorCode( int errCode ) ; //<2F><><EFBFBD><EFBFBD>HTTP<54><50><EFBFBD>صĴ<D8B5><C4B4><EFBFBD><EFBFBD><EFBFBD>
/*****************************************
*<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿں<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><EFBFBD>ⲿ<EFBFBD><EFBFBD><EFBFBD>õĽӿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD><EFBFBD>ͳһΪChannalP_s *channal
****************************************/
extern RunResult Http_Init( void ) ; //HTTP<54><50>ʼ<EFBFBD><CABC>
extern RunResult Send_Post( POSTP_s *psHttpP, char* postBody ) ; //http<74><70><EFBFBD><EFBFBD>post<73><74><EFBFBD><EFBFBD>
extern RunResult Http_Read( void ) ; //<2F><>ȡHTTP<54><50><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>
#endif