Commit graph

58 commits

Author SHA1 Message Date
eidheim
0a72f6f280 Further cleanup of examples 2017-06-23 16:28:25 +02:00
eidheim
850dcd6601 Cleanup of examples 2017-06-23 10:28:29 +02:00
eidheim
dcbb45175a Added convenience functions to examples 2017-06-23 08:05:48 +02:00
eidheim
6b7fd993cf Added convenience function Client::Response::Content::string() 2017-06-22 22:00:59 +02:00
eidheim
4efdc095bd Added convenience write functions to Server::response 2017-06-22 21:46:01 +02:00
eidheim
62da9daf87 Added Server::on_error and async client request examples 2017-06-20 14:36:05 +02:00
eidheim
ec63c4345e Cleanup of #127: using standalone asio. 2017-06-07 19:27:34 +02:00
Sébastien Huss
d50bcabf8e added Support for NO_BOOST 2017-06-05 07:39:58 +02:00
eidheim
3f8fcc0c31 Removed unused lambda captures in examples 2017-06-02 07:34:44 +02:00
eidheim
7a1a23bf9c Fixes #126: unreachable code in http(s) examples 2017-05-30 19:05:20 +02:00
eidheim
6c3a59d9ba Cleanup of server-constructors. Previous constructors have been marked as deprecated. 2016-12-29 09:53:58 +01:00
eidheim
30ef094b02 Fixes to HTTP caching (#97) 2016-12-28 10:54:59 +01:00
Sébastien Huss
acea17162c oups again, it should have been painless. At least I reviewed my commit 2016-12-20 22:27:40 +01:00
Sébastien Huss
d4f5fddba3 Made the cache feature secured in #ifdef block and added it to the http
example too
2016-12-20 22:15:58 +01:00
eidheim
8a73cb381a Fixes #86: can now set timeout on client requests 2016-11-23 07:01:48 +01:00
eidheim
88a8b154e5 Simplified the default_resource example 2016-10-24 15:41:33 +02:00
eidheim
7fb40a1be9 Reverted e50f0b597f 2016-10-19 10:19:51 +02:00
eidheim
e50f0b597f Minor cleanup of default_resource example 2016-10-19 09:41:58 +02:00
eidheim
d94f6d6d27 Slight optimisation: less copies of shared_ptr objects 2016-10-19 09:16:02 +02:00
eidheim
7120e8aff2 Minor typo fix 2016-09-07 20:56:23 +02:00
eidheim
4efd3bf83c default_resource examples should now always output errors 2016-09-07 20:34:00 +02:00
eidheim
b44fdc8183 Minor cleanup of post json example 2016-09-07 09:59:04 +02:00
Arash
dd41fb3265 Update http_examples.cpp 2016-09-04 17:57:31 +10:00
Arash
99114fd065 Update http_examples.cpp 2016-09-04 17:56:57 +10:00
Arash
1de7c6b1db Update http_examples.cpp 2016-09-04 17:55:09 +10:00
Arash
c8bbf7e789 Fixing response header
Previously, running 

$.post( "json", JSON.stringify({ firstName: "John", lastName: "Smith", age: 25 }) );

would give an error message in Firefox browser console
syntax error

Now, this error message is not shown.
2016-09-04 10:48:11 +10:00
eidheim
233fd31982 Updated work example 2016-06-29 12:26:11 +02:00
eidheim
0b397bc697 Added heavy work example 2016-06-29 10:10:34 +02:00
eidheim
3c3359f512 Improvements to default_resource examples 2016-06-29 00:34:58 +02:00
eidheim
c7284acd8f Fixes to the default_resource examples 2016-06-28 22:52:12 +02:00
eidheim
dc466e7d1d Fixes #46: library is now fully asynchronous 2016-06-28 12:49:12 +02:00
eidheim
79dca558d2 Resolved most warning messages when compiled with -Wextra or -Weverything. Related to #44 and #45 2016-05-02 13:12:57 +02:00
Ole Christian Eidheim
131cd37328 Examples: fixed crash in default_resource 2016-04-18 15:21:26 +02:00
eidheim
c7f35ade7f Cleanup of the default_resource examples 2016-03-16 11:29:04 +01:00
eidheim
38e2d09a42 Replaced unsafe std::vector and its reserve with std::array in the default_resource examples 2016-03-11 11:22:03 +01:00
eidheim
c072ae7382 Removed a test message I forgot to remove last commit 2016-03-10 16:30:20 +01:00
eidheim
359bad9862 Cleanup of the default_resource check that ensures that the request path is within the given web_root_path 2016-03-10 16:25:12 +01:00
eidheim
ef7f4692a4 Fixes #33 2016-01-06 12:45:21 +01:00
eidheim
7951ded3ec Slight cleanup and added convenience function to retrieve Request::content string. 2015-09-19 13:01:40 +02:00
eidheim
c58b7a788e Response stream now subclass std::ostream. Also some cleanup of default_resource example. 2015-09-06 17:59:02 +02:00
eidheim
c6806e6fde Minor change in examples. 2015-09-04 18:09:51 +02:00
eidheim
9e6b01eed1 Moved strand to ServerBase. 2015-09-04 18:01:16 +02:00
eidheim
c9f8a59a4d Fixes #15, file opened are now opened as binary. 2015-09-03 08:37:35 +02:00
eidheim
fa1efed7f0 Now closes file if connection is interrupted in default_resource example. Also some minor cleanup. 2015-09-02 21:02:06 +02:00
eidheim
dc944ce2fb Now using boost::filesystem in the default_resource examples. 2015-06-27 13:04:35 +02:00
Christophe Meessen
2177e330b7 Changed Request::remote_endpoint_address to std::string. Modified parse_request too keep case of header parameters. 2015-06-27 11:30:20 +02:00
eidheim
5f34b5db5e Added Request::remote_endpoint_address and Request::remote_endpoint_port that are read when Request is created. 2015-06-27 10:43:17 +02:00
Christophe Meessen
247639b1e0 /info now displays remote host and port 2015-06-27 10:35:50 +02:00
eidheim
d59a789881 default_resource: added direct write to response stream. 2015-02-23 10:03:18 +01:00
eidheim
0acc7455f8 Faster default_resource for files smaller than buffer_size. 2015-02-23 09:46:29 +01:00