forked from glynos/cpp-netlib
-
Notifications
You must be signed in to change notification settings - Fork 425
First iteration of the HTTP client for cpp-netlib v1.0.0a #350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
105 commits
Select commit
Hold shift + click to select a range
faade8a
Cleaned up thread_pool so that I can read it more clearly.
glynos 19a8b0f
Started HTTP client rewriting by removing some redundant files.
glynos 2b2c2d3
Removed a redundant header from the message framework.
glynos e1bbd36
Removed basic_storage_* types that were not being used.
glynos e888689
Removed some more redundant files.
glynos f169c24
Removed some more files that were not being used.
glynos 297a773
Removed redundant tests.
glynos 8bcce7a
First commit of network::http::v2::client.
glynos fb7eecf
Updated first set of HTTP client tests.
glynos 6b51a82
Updated client_options tests.
glynos 07e1e8e
Moved some of the tests around; added class that will represent HTTP …
glynos 4eac522
Added a some extra options for the client and the request; removed so…
glynos 71757f1
Updated client sources, adding some more tests.
glynos 73b0831
Added some additional tests for the HTTP URL.
glynos 70a99a9
Added a message_base class.
glynos 40e3b59
Added HTTP constants for client 1.0.x.
glynos f23c827
Updated and added HTTP constants.
glynos 72ea85e
Updated constants and message headers.
glynos 06cd005
Updated build scripts so as not to build the old client and server; a…
glynos 5ecb5c7
Next iteration of improvements, still a long way from a working HTTP …
glynos 41f4ec2
Added a client_errors file and invalid_scheme class.
glynos b700bcc
Added tests and methods to the HTTP request.
glynos 6540a84
Added async_resolver.
glynos 7f9f50e
Added logging again to project.
glynos d653b4b
Added connection_timeout exception.
glynos 055e513
Added resolver_error.
glynos 06b8b94
Added resolver delegate.
glynos 5b82479
Added connection_delegate and test files (no test cases yet).
glynos 88f6faf
Removed message_base.hpp
glynos 0610d08
Updated errors and the HTTP request.
glynos d9174e6
Updated method type.
glynos 5e68836
Updated requests test to check the port number.
glynos 83cca78
A few updates to the client - next step is to test the components ind…
glynos b0cdd9a
Added igloo BDD-style feature testing framework.
glynos 7bcf001
Moved the unit tests around.
glynos b895062
Async resolver tests now use igloo.
glynos 85830b0
Updated feature tests for client and connections.
glynos dc2d4cb
Updated some stuff that's not important.
glynos 3faaa69
Updated Doxygen comments on almost all files. Added a response_parser…
glynos 3442d76
Resolver now uses asynchronous futures.
glynos b80ab15
Little hack to make async connection test pass (it's actually synchro…
glynos 22df4eb
Done a lot of stuff to play around with HTTP - it successfully makes …
glynos 7415d62
Updated the resolver to avoid using futures,as this turned to be very…
glynos 8295fb8
Well these test all pass...
glynos 8976b43
Updated response parser tests.
glynos ebd7567
Updated tests for the response parser, added cancellation member func…
glynos 6a7205e
Mostly updates to documentation.
glynos 3d0cc92
Some more, incomplete documentation.
glynos af77702
Updates to some of the tests.
glynos 40a2309
Renamed async_resolver_delegate, and removed some of the framework cr…
glynos bcd5554
Renamed connection_delegate.
glynos 00654de
Removed some unnecessary files.
glynos 3382000
Replaced std::function handler with a template in async_resolver.
glynos 41a1e67
Removed warnings from CMakeLists.txt files, because of the noise from…
glynos d100aaa
Removed date_time from Boost_COMPONENTS because it is header-only in …
glynos 8847a53
Renamed tests.
glynos 4b1fd17
Rewrote constants.
glynos ae2c6d8
Updated uri submodule.
glynos 84a555b
Reworked status and HTTP client request.
glynos 603547c
Modification to connection test.
glynos 58a7782
Added an HTTP response error.
glynos 9345bed
Updated tests for the response_parser.
glynos bb006d6
Added free swap functions to client_options, request_options, request…
glynos b7e7aa5
Updated the connection and the connection tests.
glynos 28ffad1
Minor refactoring in request, response, client.
glynos 609ed29
Used macro NETWORK_NOEXCEPT instead of keyword noexcept.
glynos bb42b4f
Fixed include guards.
glynos 7a3e856
Updated uri submodule.
glynos d945654
Minor changes to the thread_pool class and headers.
glynos e8d9262
Reverted changes where I used a macro for a noexcept replacement - we…
glynos 74d99b8
Merge remote-tracking branch 'upstream/master' into client-v2
glynos 0c85833
Updated tests for client.
glynos 0739a4a
Added some new HTTP status codes.
glynos 184d278
Updated some HTTP client errors.
glynos d68fb57
Added a small project for generic network errors.
glynos d043072
Added doxygen documentation for error handling.
glynos b469278
Renamed concurrency library.
glynos 4be2b5a
Commented out stuff so the HTTP client test did not crash, at least.
glynos 7afed49
Updated README documentation.
glynos 695e074
Updated the Doxyfile.
glynos 4373fc1
Updated error handling for general networking errors. Added a network…
glynos b02948f
Replaced the Handler template with std::function.
glynos 29ec7e2
Renamed base class connection to async_connection.
glynos 416fe04
Added an endpoint_cache class; refactored async_resolver.
glynos 58d5f94
Made async_resolver and ABC; added implementation in tcp_resolver.
glynos 44b9185
Test fails with an exception instead of a crash - progress of a kind...
glynos 2012b58
Fixed crash in HTTP client, 'get' now only returns an empty response.
glynos a8bad17
Continued to work on the HTTP client.
glynos 619255a
Updated the client and response classes in order to make a successful…
glynos ce3bccf
Validated that the HEAD response returns the headers.
glynos 6eb8e03
Lower case enum for HTTP status code for consistency.
glynos b6c2bee
Updated client errors and added code to allow the processing of a res…
glynos 8f5ea83
Re-added and updated HTTP examples.
glynos 5d8d744
Added .clang-format for source code formatting.
glynos 6441091
Allow the v0.x HTTP server to be built; Refactored HTTP v2 client req…
glynos d5b65ee
Refactored client connections into a client_connection namespace.
glynos 23ef8d0
Fixed bug in parsing the HTTP headers in the HTTP client.
glynos 6830eba
Refactored internals of client.
glynos 6ff897f
Continued to refactor the HTTP client; made the method enum class low…
glynos 1238f44
Continued to refactor and document the HTTP client source and tests.
glynos 3e33f13
Continued refactoring, improved read_headers and simple_wget examples.
glynos a465cd8
Updated uri submodule.
glynos 49310b1
Added a flag to turn on/off the feature tests, which may access the n…
glynos ebc7762
Added .travis.yml
glynos e639f47
Fixed some warnings in the HTTP client request and client_exception.
glynos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# BasedOnStyle: Google | ||
AccessModifierOffset: -1 | ||
ConstructorInitializerIndentWidth: 4 | ||
AlignEscapedNewlinesLeft: true | ||
AlignTrailingComments: true | ||
AllowAllParametersOfDeclarationOnNextLine: true | ||
AllowShortIfStatementsOnASingleLine: true | ||
AllowShortLoopsOnASingleLine: true | ||
AlwaysBreakTemplateDeclarations: true | ||
AlwaysBreakBeforeMultilineStrings: true | ||
BreakBeforeBinaryOperators: false | ||
BreakConstructorInitializersBeforeComma: false | ||
BinPackParameters: true | ||
ColumnLimit: 80 | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
DerivePointerBinding: true | ||
ExperimentalAutoDetectBinPacking: false | ||
IndentCaseLabels: true | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: All | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we please not indent namespaces? |
||
ObjCSpaceBeforeProtocolList: false | ||
PenaltyBreakComment: 60 | ||
PenaltyBreakString: 1000 | ||
PenaltyBreakFirstLessLess: 120 | ||
PenaltyExcessCharacter: 1000000 | ||
PenaltyReturnTypeOnItsOwnLine: 200 | ||
PointerBindsToType: true | ||
SpacesBeforeTrailingComments: 2 | ||
Cpp11BracedListStyle: true | ||
Standard: Auto | ||
IndentWidth: 2 | ||
TabWidth: 8 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we set this to 4? |
||
UseTab: false | ||
BreakBeforeBraces: Attach | ||
IndentFunctionDeclarationAfterType: true | ||
SpacesInParentheses: false | ||
SpaceInEmptyParentheses: false | ||
SpacesInCStyleCastParentheses: false | ||
SpaceAfterControlStatementKeyword: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
language: | ||
- cpp | ||
|
||
compiler: | ||
- clang | ||
- gcc | ||
|
||
env: | ||
- BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release" | ||
- BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release" | ||
- BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug" | ||
- BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug" | ||
|
||
before_install: | ||
- sudo add-apt-repository ppa:apokluda/boost1.53 --yes | ||
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test --yes # libstdc++-4.8 | ||
- if [ "${CXX}" == "clang++" ]; then sudo add-apt-repository --yes ppa:h-rayflood/llvm; fi # clang++-3.2 | ||
- sudo apt-get update | ||
|
||
install: | ||
- if [ "${CXX}" == "clang++" ]; then sudo apt-get -qq install clang-3.2; fi | ||
- sudo apt-get install g++-4.8; # clang need it for libstdc++ update | ||
- sudo apt-get install libboost-system1.53-dev | ||
- sudo apt-get install libboost-regex1.53-dev | ||
- sudo apt-get install libboost-filesystem1.53-dev | ||
|
||
before_script: | ||
# update compilers | ||
- if [ "${CXX}" == "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi | ||
- if [ "${CXX}" == "clang++" ]; then export CXX="clang++-3.2" CC="clang-3.2"; fi | ||
|
||
script: | ||
- mkdir _build | ||
- cd _build | ||
# Note: clang not support libc++ | ||
- cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -DCPP-NETLIB_DISABLE_LIBCXX=YES -DCPP-NETLIB_DISABLE_FEATURE_TESTS=YES .. | ||
- make | ||
- make test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not so happy with this style.