]> git.mxchange.org Git - simgear.git/commit
io: refactor and improve HTTP modules.
authorThomas Geymayer <tomgey@gmail.com>
Sun, 27 Oct 2013 17:40:14 +0000 (18:40 +0100)
committerThomas Geymayer <tomgey@gmail.com>
Sun, 27 Oct 2013 18:05:49 +0000 (19:05 +0100)
commitf93fead8f277403bd1759bc20d995e8935c53bc9
tree25c5c7977b920735e375ede56c4c8d1c41435d74
parent050f3791cce3aa03cb7ce88762b95f92b669fd2b
io: refactor and improve HTTP modules.

 - refactor code used multiple times spread over sg/fg into
   one single location.
 - allow aborting requests.
 - Provide two common request types:
  * FileRequest: Save response into file
  * MemoryRequest: Keep resonse in memory (std::string)
 - extend HTTP::Client interface:
  * urlretrieve: Save url to file (shortcut for making a
                 FileRequest)
  * urlload: Get respons into memory (shortcut for making
             a MemoryRequest)
15 files changed:
simgear/io/CMakeLists.txt
simgear/io/HTTPClient.cxx
simgear/io/HTTPClient.hxx
simgear/io/HTTPFileRequest.cxx [new file with mode: 0644]
simgear/io/HTTPFileRequest.hxx [new file with mode: 0644]
simgear/io/HTTPMemoryRequest.cxx [new file with mode: 0644]
simgear/io/HTTPMemoryRequest.hxx [new file with mode: 0644]
simgear/io/HTTPRequest.cxx
simgear/io/HTTPRequest.hxx
simgear/io/SVNRepository.cxx
simgear/io/httpget.cxx
simgear/io/sg_netChat.hxx
simgear/io/test_HTTP.cxx
simgear/package/Catalog.cxx
simgear/package/Install.cxx