Commit Graph

86 Commits

Author SHA1 Message Date
halx99 7cdfcafd2a string_view for android 2021-12-27 19:18:36 +08:00
halx99 0076283252 Huge changes for all string_view 2021-12-26 23:26:34 +08:00
halx99 2ba77a42fb Committing clang-format changes 2021-12-25 02:04:45 +00:00
halx99 e2f13576ae Delete obj-c style callback 2021-12-10 19:20:33 +08:00
halx99 b459acbcf7 Remove all unnecessary nothrow 2021-12-08 00:11:53 +08:00
halx99 ee79b844a7 Fix #540 2021-11-23 12:53:13 +08:00
halx99 4fc5ee5840 Add HttpClient::setNameServers
a. support set custom dns server list when c-ares enabled.
2021-10-23 21:57:36 +08:00
halx99 14a295af52 Add HttpClient::getInternalService 2021-09-05 22:18:42 +08:00
halx99 b7f391cbff HttpClient: clear channel ud when it been recycle 2021-08-31 15:53:46 +08:00
halx99 5e88382a93 Fix #443
a. HttpClient: improve request header processing
2021-08-05 14:56:40 +08:00
halx99 cfffd35aec HttpClient: push front available channel to fix dns cache missing 2021-08-03 14:41:30 +08:00
halx99 71c17cfc9b Add HttpClient::handleNetworkStatusChanged to clear DNS cache 2021-07-31 14:39:42 +08:00
halx99 8fdb279a28 Fix ci 2021-07-19 14:49:38 +08:00
halx99 04aa501cde Improve code quality 2021-07-19 14:17:51 +08:00
halx99 fc768cbd3b Improve code quality 2021-07-19 13:43:59 +08:00
halx99 abd98f50aa HttpClient cookie support 2021-07-19 12:26:25 +08:00
halx99 b167ffc311 Use lowercase as preferred to storage HttpResponse headers [skip ci] 2021-07-19 08:04:12 +08:00
halx99 648a5b5554 HttpClient: Improve url redirect process 2021-07-19 00:17:50 +08:00
halx99 54a97c5820
Delete unused comment 2021-07-07 04:08:07 +08:00
halx99 45ad0d86fe Implement HttpClient::sendSync with std::promise 2021-07-06 11:39:53 +08:00
halx99 ca859645ef HttpClient: Fix crash when process redirect 2021-07-06 02:44:57 +08:00
halx99 04fc722d8d HttpClient: refine User-Agent encoding 2021-07-05 20:42:22 +08:00
halx99 7405c5781b HttpClient handle content type from custom headers 2021-07-05 14:24:04 +08:00
halx99 5f33ddeee6 Improve HttpResponse interanlCode set 2021-06-25 18:29:16 +08:00
halx99 c7dd59b2ad
Simplify code 2021-06-25 08:18:32 +08:00
halx99 94fc8f6ee8 Fix HttpClient compatible issue
a. should let user do urlencode manually
b. this behavior is same with previous curl implemented HttpClient
2021-06-25 07:07:59 +08:00
halx99 a379f936d8
Reimplement HttpClient based on yasio (#390)
* [WIP] Reimplement HttpClient based on yasio
This change will make HttpClient support concurrency request

* [WIP] Reimplement HttpClient based on yasio
a. timeoutForRead support
b. Improve code

* [WIP] Reimplement HttpClient based on yasio [ci build]

* [WIP] Fix ci [ci build]

* [WIP] Reimplement HttpClient based on yasio [ci build]
PUT,DELETE support

* [WIP] Reimplement HttpClient based on yasio [ci build]
HttpClientTest works

* Update HttpClient.cpp

* HttpClientTest: enable sslVerifaction test

* Update HttpResponse.h

* Sync luabindings [ci build]

* Add chrome UA test

* Fix ci [ci build]

* The timer for read timeout should be associated with per channel

* Remove unused function

* Update url
2021-06-24 12:33:07 +08:00
rh101 ce1a24cb15 Ensure FileStream is used for file access where possible 2021-04-25 17:22:43 +10:00
halx99 4ee711599c Add setDispatchOnWorkThread support 2020-10-08 00:00:14 +08:00
HALX99 a83c52d67c
Refine HttpClient (#224) 2020-10-05 08:32:48 +08:00
halx99 b3b8d8b960 Refine HttpClient 2020-10-05 02:40:38 +08:00
halx99 9586f95c81 fix #223 2020-10-05 00:10:31 +08:00
halx99 baa5f69a81 Add custom hosts support for HttpReuqest
refer to: https://curl.haxx.se/libcurl/c/CURLOPT_RESOLVE.html
2020-10-04 23:44:52 +08:00
minggo 62d20a9825
Add clear request and responses method to httpclient (#19598)
* Added functionality to clear pending responses and requests in the http client

* Responses and Requests now are processed in similar way

* Fix for clearing the http requests

* Added tests for HttpClient::clearResponseAndRequestQueue
2019-04-10 18:33:55 -07:00
leeda 18a6d8241d update Copyright. might need manual fix later (#18659)
* Copyright use python script updated. might be fix by manual later

* Revert "Copyright use python script updated. might be fix by manual later"

This reverts commit 49e99418e4da1fd02afda448ddeb16210f5e8c71.

* re modify copyright, consider utf-8-sig encoding

* another situation, add Copyright before  "Permission is hereby granted"

* Revert "another situation, add Copyright before  "Permission is hereby granted""

This reverts commit ee82591d32353c7ce2e146fe51ef447433b47571.

* another situation, add Copyright before Permission is hereby granted

* change "Copyright (c) 2016-2016 Chukong Technologies Inc." to " Copyright (c) 2016 Chukong Technologies Inc."

* script modify copyright, consider is cocos copyright or not

* change "Copyright (c) 2017 Chukong Technologies Inc." to "Copyright (c) 2016 Chukong Technologies Inc."

* manual fix, not fix audio related

* change "2016-2016" to "2016"
2018-01-29 16:25:32 +08:00
pandamicro 0e0987d337 Support notify progression in XMLHTTPRequest (#17509)
* Support notify progression in XMLHTTPRequest

* Fix indent

* Fix issues

* fix issue
2017-03-16 14:09:51 +08:00
CocosRobot d07794052f Update license to 2017 (#17362)
* Typo: CopyRight -> Copyright

* Copyright update: chukong-inc.com -> Chukong Technologies Inc.

* [js files] Copyright update: 2014 -> 2014-2017

* [cpp files] Copyright update: 2014 -> 2014-2017

* Copyright update: 2015 -> 2015-2017

* [js files] Copyright update: 2014 -> 2014-2017

* Copyright update: 2016 -> 2016-2017

* Copyright update: 2013 -> 2013-2017

* Copyright update: 201?-201? -> 201?-2017

* License year fixes.

* Liscene year fix in CCRay.cpp

* Updates license years in CCGLProgramState.h & CCGLProgramStateCache.h
2017-02-14 14:36:57 +08:00
James Chen 55a97f6107 Wrong assert logic fix in HttpClient. (#17330)
* Wrong assert logic fix in HttpClient.

* Updates assert prompt
2017-02-09 09:56:24 +08:00
j-jorge c616d6d9ff Compilation fix (#17209)
* Fix various compilation issues.

Mostly errors on field initialization order but also missing files
in CMakeLists and missing include directives.

* Fix compilations issues with GCC 6.2

* Fix gitignore libs/ entry to not ignore the Android external libraries.
2017-02-04 09:46:32 +08:00
mogemimi efc3e5979b Fix typo in function name (#17202) 2017-01-18 15:40:46 +08:00
Wilson E. Alvarez c0e1e91373 Performance tweak: Use range-based for-loops and allocate std::vector size() and *end() on the stack where favorable. (#16716)
* Use range-based for-loops and allocate std::vector size(), end(), cend(), rend(), crend() on the stack where favorable.

Other minor trivial changes were applied.

* Fixed Android compilation error

* Fixed windows-universal compilation error
2016-10-27 15:10:24 +08:00
James Chen b135d512d2 Update copyright to 2016. (#16311) 2016-08-05 09:42:15 +08:00
James Chen 1db3c1644d dlfree fix for HttpClient, the instances of Ref or its sub classes should be released by CC_SAFE_RELEASE rather than CC_SAFE_DELETE. 2016-05-25 13:54:13 +08:00
Xpol Wan 90456d29ba Fixes 1605 include path in 541 files
using the tools/coding-style/include-linter.py with -f options.
2016-03-20 21:53:44 +08:00
jianglong0156 8d011fd457 formate the space 2015-06-05 11:45:05 +08:00
jianglong0156 97d0265e32 gzip test 2015-06-02 10:23:30 +08:00
samuele3hu 27e7101322 fix the memory leak of s_requestSentinel for httpclient and adjust the global static var into the object to avoid some unexpected result. 2015-05-22 10:47:52 +08:00
minggo 7805adce94 Merge pull request #10325 from seobyeongky/httpclient_bugfix
HttpResponse reference counting bug fixed
2015-02-27 14:32:41 +08:00
mogemimi d384f7ce1e Fix typo: unkown -> unknown 2015-02-24 02:39:50 +09:00
byeonggee.seo 23e0320cac HttpResponse reference counting bug fixed 2015-02-02 12:23:15 +09:00