Previously curl_slist_free_all(cHeaders) called in loop after
many break statements, so there was no garantue that it will be called
in all cases.
This change also simplifies code to make implementing PUT/DELETE methods
easier.
Some CCLog message contained trailing newlines which
made the logs hard to read on many platforms. The solution
here is to stip trailing newlines on those platforms, and also
to remove the newlines from the existing log messages.
cocos2d-x.git/extensions/network/HttpClient.h:64: warning: The following parameters of cocos2d::extension::CCHttpClient::setTimeoutForConnect(int value) are not documented:
parameter 'value'
cocos2d-x.git/extensions/network/HttpClient.h:79: warning: argument 'timeout' of command @param is not found in the argument list of CCHttpClient::setTimeoutForRead(int value)
cocos2d-x.git/extensions/network/HttpClient.h:79: warning: The following parameters of cocos2d::extension::CCHttpClient::setTimeoutForRead(int value) are not documented:
parameter 'value'