6#ifndef _ZFI_ZFHttpRequest_h_
7#define _ZFI_ZFHttpRequest_h_
97 _ZFP_ZFHttpRequestPrivate *d;
278 _ZFP_ZFHttpRequestPrivate *d;
_ZFT_t_zfchar zfchar
char wrapper
Definition ZFCoreTypeDef_CharType.h:17
#define zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define zfoverride
dummy macro shows that method override parent's method
Definition ZFCoreTypeDef_ClassType.h:58
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define ZF_IN_OUT
dummy macro that shows the param used as required input and output
Definition ZFCoreTypeDef_ClassType.h:196
#define zfclassFwd
forward declaration of a class type
Definition ZFCoreTypeDef_ClassType.h:31
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
_ZFT_t_zfindex zfindex
similar to size_t, used for index and size only
Definition ZFCoreTypeDef_CoreType.h:154
_ZFT_t_zfint zfint
same as int, see zfindex
Definition ZFCoreTypeDef_CoreType.h:165
_zft_zftimet zftimet
time unit, ensured at least 64 bit, ensured signed
Definition ZFCoreTypeDef_CoreType.h:203
#define zftimetInvalid()
invalid time value
Definition ZFCoreTypeDef_CoreType.h:205
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
zft_zfstring< zfchar > zfstring
see zft_zfstring
Definition ZFCoreTypeDef_StringType.h:15
#define ZFENUM_SEPARATOR()
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:158
#define ZFENUM_VALUE_REGISTER(Value)
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:168
#define ZFENUM_REG(ZFLIB_, EnumName,...)
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:186
#define ZFENUM_VALUE(Value)
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:151
#define ZFENUM_BEGIN(ZFLIB_, EnumName)
macros to define reflectable enum type
Definition ZFEnumDeclare.h:147
#define ZFENUM_END(ZFLIB_, EnumName)
see ZFENUM_BEGIN
Definition ZFEnumDeclare.h:172
void ZFUrlParamSet(zfstring &url, const ZFJson ¶ms)
util to modify url
zfstring ZFUrlParamGet(const zfchar *url, const zfchar *key, const zfchar *def=(zft_zfnull))
util to get param from url
zfautoT< ZFHttpResponse > ZFHttpHeadCache(const zfstring &url)
util to fetch head info, or load from cache if available
zfautoT< ZFHttpResponse > ZFHttpHeadCacheRemove(const zfstring &url)
see ZFHttpHeadCache
v_ZFHttpMethod::ZFEnumType ZFHttpMethod
see v_ZFHttpMethod
Definition ZFHttpRequest.h:35
zfstring ZFUrlEncode(const zfchar *src)
url encode util
zfstring ZFUrlDecode(const zfchar *src)
url decode util
void ZFUrlDecodeT(zfstring &ret, const zfchar *src)
url decode util
void ZFUrlEncodeT(zfstring &ret, const zfchar *src)
url encode util
zfstring ZFUrlForParam(const zfchar *url, const ZFJson ¶ms)
util to generate url
void ZFHttpHeadCacheRemoveAll()
see ZFHttpHeadCache
#define ZFMP_IN_OUT(ParamType, paramName)
see ZFMP_IN
Definition ZFMethod.h:117
#define ZFMP_IN_OPT(ParamType, paramName, DefaultValue)
see ZFMP_IN
Definition ZFMethod.h:108
#define ZFMP_IN(ParamType, paramName)
macro to wrap param types for ZFMETHOD_INLINE_0 series
Definition ZFMethod.h:105
#define ZFMETHOD_DECLARE_0(ReturnType, MethodName)
see ZFMethod
Definition ZFMethodDeclare.h:693
#define ZFMETHOD_DECLARE_STATIC_0(ReturnType, MethodName)
see ZFMethod
Definition ZFMethodDeclare.h:708
#define ZFMETHOD_DECLARE_2(ReturnType, MethodName, ZFMP_0, ZFMP_1)
see ZFMethod
Definition ZFMethodDeclare.h:1025
#define ZFMETHOD_DECLARE_1(ReturnType, MethodName, ZFMP_0)
see ZFMethod
Definition ZFMethodDeclare.h:854
#define ZFMETHOD_FUNC_DECLARE_2(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:763
#define ZFMETHOD_FUNC_DECLARE_3(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1, ZFMP_2)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:910
#define ZFMETHOD_FUNC_DECLARE_0(ZFLIB_, ReturnType, MethodName)
declare function type of ZFMethod
Definition ZFMethodFuncDeclare.h:493
#define ZFMETHOD_FUNC_DECLARE_1(ZFLIB_, ReturnType, MethodName, ZFMP_0)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:624
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
global header for ZFNet module
#define ZFLIB_ZFNet
used to export symbols
Definition ZFNetDef.h:15
#define zfclass
same as class, shows that this class is a ZFObject type
Definition ZFObjectClassTypeFwd.h:38
#define ZFOBJECT_ON_INIT_DECLARE_2(ZFMP_0, ZFMP_1)
see ZFOBJECT_ON_INIT_INLINE_1
Definition ZFObjectDeclare.h:290
#define ZFOBJECT_DECLARE(ChildClass, SuperClass,...)
necessary for every class inherit from ZFObject
Definition ZFObjectDeclare.h:126
#define ZFOBJECT_PRIVATE_ALLOC(...)
mark this object can not be allocated directly
Definition ZFObjectDeclare.h:245
#define ZFIMPLEMENT_DECLARE(ImplementedInterfaces,...)
see ZFINTERFACE_DECLARE
Definition ZFObjectInterface.h:169
#define zfimplement
shows class implement from interface, see ZFInterface
Definition ZFObjectInterface.h:24
#define ZFEVENT(YourEvent)
see ZFObject::observerNotify
Definition ZFObjectObserver.h:328
#define ZFPROPERTY_ASSIGN(Type, Name,...)
see ZFPROPERTY_RETAIN
Definition ZFPropertyDeclare.h:128
#define ZFPROPERTY_ON_ATTACH_DECLARE(Type, Name)
see ZFPROPERTY_ON_INIT_DECLARE
Definition ZFPropertyDeclare.h:248
virtual zftimet & timeout()
timeout
Definition ZFHttpRequest.h:168
virtual zfiter headerIter()
iterator for header
virtual void objectOnDealloc(void)
override this to destroy your object
virtual void objectInfoImplAppend(zfstring &ret)
see objectInfo
virtual void headerIterRemove(zfiter &it)
iterator for header
virtual zfstring headerInfo()
print all header info, usually for debug use only
virtual zfstring headerIterKey(const zfiter &it)
iterator for header
virtual zfstring headerIterValue(const zfiter &it)
iterator for header
virtual void objectOnInit(const zfstring &url, ZFHttpMethod method=(v_ZFHttpMethod::e_GET))
init and connect
virtual void headerRemove(const zfstring &key)
remove http header
virtual void stop()
cancel the request
static zfbool httpsAvailable()
whether https impl available
virtual zfautoT< ZFHttpResponse > startSync(zftimet timeout=(((zftimet) -1)))
util to perform sync request, return null if timeout
virtual zfstring contentInfo()
print all content info, usually for debug use only
virtual void body(const zfstring &buf)
append content to body
virtual void header(const zfstring &key, const zfstring &value)
set http header
virtual ZFHttpMethod & httpMethod()
the http method, GET/POST/..., GET by default
Definition ZFHttpRequest.h:175
virtual zfstring & url()
the request url
Definition ZFHttpRequest.h:171
virtual zfindex headerCount()
response header count
virtual void start(const ZFListener &callback=(zft_zfnull))
start the request
see ZFHttpRequest
Definition ZFHttpRequest.h:43
virtual void objectOnInit(void)
override this to init your object
virtual void objectOnDealloc(void)
override this to destroy your object
virtual zfiter headerIter()
iterator for header
virtual zfstring headerIterKey(const zfiter &it)
iterator for header
virtual zfbool & success()
whether the request is considered success
Definition ZFHttpRequest.h:48
virtual void objectInfoImplAppend(zfstring &ret)
see objectInfo
virtual zfstring header(const zfstring &key)
get the response header
virtual zfstring & errorHint()
error hint, if error occurred
Definition ZFHttpRequest.h:52
virtual zfindex headerCount()
response header count
virtual zfstring headerInfo()
print all header info, usually for debug use only
virtual zfint & code()
http response code
Definition ZFHttpRequest.h:50
virtual zfstring & body()
response body
Definition ZFHttpRequest.h:59
virtual zfstring contentInfo()
print all content info, usually for debug use only
virtual zfstring headerIterValue(const zfiter &it)
iterator for header
JSON item.
Definition ZFJson.h:167
listener as ZFCallback, mostly used by ZFObject::observerNotify
Definition ZFObjectObserver.h:30
http method type
Definition ZFHttpRequest.h:15
type restrict version of zfauto
Definition zfautoFwd.h:110
iterator for ZFFramework
Definition zfiter.h:40