HTTP Client data container for form(multipart/form-data)
Dependencies: mbed EthernetInterface HTTPClient mbed-rtos
HTTPNull.cpp
00001 /* HTTPNull.cpp */ 00002 //Debug is disabled by default 00003 #if 1 00004 //Enable debug 00005 #include <cstdio> 00006 #define DBG(x, ...) std::printf("[HTTPNull : DBG]"x"\r\n", ##__VA_ARGS__); 00007 //#define DBG(x, ...) 00008 #define WARN(x, ...) std::printf("[HTTPNull : WARN]"x"\r\n", ##__VA_ARGS__); 00009 #define ERR(x, ...) std::printf("[HTTPNull : ERR]"x"\r\n", ##__VA_ARGS__); 00010 00011 #else 00012 //Disable debug 00013 #define DBG(x, ...) 00014 #define WARN(x, ...) 00015 #define ERR(x, ...) 00016 00017 #endif 00018 00019 #include "HTTPNull.h" 00020 00021 #define OK 0 00022 00023 HTTPNull::HTTPNull() 00024 { 00025 00026 } 00027 00028 //IHTTPDataOut 00029 /*virtual*/ int HTTPNull::write(const char* buf, size_t len) 00030 { 00031 DBG("write(%p, %d)", buf, len); 00032 return OK; 00033 } 00034 00035 /*virtual*/ void HTTPNull::setDataType(const char* type) //Internet media type from Content-Type header 00036 { 00037 DBG("setDataType(%s)", type); 00038 } 00039 00040 /*virtual*/ void HTTPNull::setIsChunked(bool chunked) //From Transfer-Encoding header 00041 { 00042 00043 } 00044 00045 /*virtual*/ void HTTPNull::setDataLen(size_t len) //From Content-Length header, or if the transfer is chunked, next chunk length 00046 { 00047 DBG("setDataLen(%d)", len); 00048 }
Generated on Wed Jul 13 2022 04:23:07 by 1.7.2