Commit Graph

83 Commits

Author SHA1 Message Date
Darius Tan
d7f1985e4c Edit example_vs.cpp to use CROW_ROUTE instead of app.route_dynamic.
VS2019 error:
'<function-style-cast>': cannot convert from 'void' to 'crow::response'
2021-05-23 20:59:21 +12:00
Darius Tan
44abb2d327 Add vcpkg.json to download Boost, openssl and zlib. Edit docs/getting-started/setup.md to show a simple setup with example_with_all.cpp. 2021-05-23 20:58:23 +12:00
The-EDev
f39b9ddce7 Quality of life improvements
Added pop() method to query_string, same as get(), but removes the item from the querystring
Added std::string() operator to json::rvalue (allows std::string(json["abc"]), which returns any value that isn't a container to string)
Added lo() method to json::rvalue, returns a vector of json::rvalue containing whatever a json object or list has (difference being a list has no keys)
Added keys() method to json::rvalue, returns a vector of std::string containing the keys of a json object
Made json::wvalue use either std::map or std::unordered_map instead of just std::unordered_map
Added copy constructor to json::wvalue
Added size() method to json::wvalue, returns 1 or the size of the json list.
Added constructor to create json::wvalue from std::vector
Added keys() method to query_string
Documented query_string and improved json doc
Made tests and examples for all the additions
2021-05-12 15:45:55 +03:00
Farook Al-Sammarraie
4aae614297
Merge branch 'master' into catch_all 2021-04-12 10:49:29 +03:00
The-EDev
f779a0f8a4 changed catchall to fit with the rest of crow
the macro is similar to CROW_ROUTE, added example to cmake, added unit test, and documentation
2021-04-12 08:25:09 +03:00
Ulrich Germann
e592e6b4f2 Fix error in examples/CMakeLists.txt
cmake 3.19 complained about Line 49:

> CMake Error at examples/CMakeLists.txt:49 (target_link_libraries):
>   The keyword signature for target_link_libraries has already been used with
>     the target "basic_example".  All uses of target_link_libraries with a
>       target must be either all-keyword or all-plain.
>
>   The uses of the keyword signature are here:
>
>    * examples/CMakeLists.txt:46 (target_link_libraries)

The reason is the missing keyword PRIVATE/INTERFACE/PUBLIC in the offending line.
This edit fixes this.
2021-04-06 11:17:51 +00:00
Tibbel
76203052e7
Add files via upload 2021-04-05 10:21:14 +02:00
Maxim Kokryashkin
cdce8f443a macro rename 2021-03-31 20:30:32 +03:00
Maxim Kokryashkin
ce7d08eb0e fixed issues with static wariables 2021-02-21 00:28:32 +03:00
sfinktah
1918d2e58c
Removed unnecessary line.
Does anybody know whether the big red "Delete File" option when reviewing commit deletes the entire file from the repo or just from the commits (or the PR)?
2021-02-10 19:55:51 +11:00
sfinktah
0bf0c43f39
Update example_with_all.cpp
oops, had to reverse a change i made to get it to compile as-is.
2021-02-09 03:27:50 +11:00
Sfinktah Bungholio
740bd266e7 fixes for **some** msvc compatibility issues 2021-02-09 03:25:02 +11:00
The-EDev
747ad6db72 Merge branch 'master' 2021-01-21 21:37:55 +03:00
The-EDev
3aaef5e0fd fixed merge errors 2021-01-21 21:36:41 +03:00
The-EDev
78ee97124b Merge branch 'master'
Conflicts:
	CMakeLists.txt
	examples/CMakeLists.txt
	include/crow/http_connection.h
	tests/CMakeLists.txt
2021-01-21 06:56:02 +03:00
The-EDev
75feb183b1 Merge branch 'master'
Conflicts:
	CMakeLists.txt
2021-01-15 03:47:40 +03:00
Michele Adduci
ccb7dca9d6
Added explicit message when OpenSSL is not found
example_ssl won't be built if OpenSSL is not found: a status message will be shown instead
2021-01-14 06:19:15 +01:00
Michele Adduci
bc250a3f66 Cleaned up indentation, added comments, bumped Boost minimum version to 1.64 2021-01-12 13:31:33 +01:00
Michele Adduci
96e1b2c157 Fixed issue with compiler options 2021-01-11 06:59:32 +01:00
Michele Adduci
6d4c7d8a9b New CMake refactoring 2021-01-08 16:13:39 +01:00
The-EDev
33f1206571 made json a returnable type and removed json specific code 2021-01-05 17:49:10 +03:00
The-EDev
09d0f4ccdd Added HTTP compression using gzip or deflate (disabled by default, requires calling method) 2021-01-02 22:12:04 +03:00
Ayaan Khan
716aa046fc
Merge branch 'master' into master 2020-12-03 12:46:57 +05:30
ayaankhan98
87e29c2aba fix: std::string && req parameter 2020-12-03 12:46:38 +05:30
ayaankhan98
8371bdb09f fix: std::string && req parameter 2020-12-03 12:43:50 +05:30
Makaveli
9bc030478f Settable server name feature 2020-12-02 20:15:05 -05:00
ayaankhan98
770359e79f fix: ambigous call and example 2020-12-02 15:36:29 +05:30
Ayaan Khan
6c7bef1eda
Merge branch 'master' into master 2020-12-01 12:03:02 +05:30
ayaankhan98
a7c74c6327 recieve response without request being another argument in handle 2020-12-01 11:50:46 +05:30
Farook Al-Sammarraie
d1aaff87ea
Merge branch 'master' into patch-1 2020-11-18 20:13:08 +03:00
Srivatsan Iyer
267694dbbc Fix #include for example_with_all. Using relative directories like "../build/crow_all.h" might not work in all settings. 2020-11-18 22:15:38 +05:30
Srivatsan Iyer
f561852233 Rename CMake target: example -> basic_example. 2020-11-18 22:15:01 +05:30
The-EDev
24830648d2 added macros for static endpoint and directory
(also put some info in the example)
2020-11-10 23:56:27 +03:00
The-EDev
f93d9a8a22 updated paths to merge_all.py, c++ version in cmake, and logo in readme 2020-10-31 21:22:34 +03:00
Farook Al-Sammarraie
65b12e88e8
Merge branch 'master' into multipart 2020-10-20 10:10:52 +03:00
Igor Mróz
d33f04c7e7
CMakeLists small changes. Add clang-format config. Remove Makefile. 2020-10-19 18:32:16 +02:00
Igor Mróz
7b8b72bd11
Remove conanfile. Update mustache specification jsons. Remove compilation warnings. Update CMake version. Change test framework to Catch2. 2020-10-19 18:32:16 +02:00
The-EDev
8da6919617 fixed issue in example 2020-10-18 03:38:50 +03:00
The-EDev
6a760ca09f added simple example 2020-10-18 03:20:19 +03:00
Farook
03f6d6c818 added static file example 2020-10-04 19:29:56 +03:00
ipknHama
274aad86e7 Remove amalgamation result (crow_all.h) from the repository 2017-09-18 05:15:41 +09:00
ipknHama
2c26b6c1de Change default settings
- disable crow debug mode by default
 - expose `loglevel` method on `App` to change the logging level easily
 - add a startup message that guides how to change the logging level
2017-09-18 02:58:53 +09:00
Jaeseung Ha
08acc7c0be Merge branch 'master' into master 2017-09-18 00:43:42 +09:00
ipknHama
414809c742 Change websocket example to use default templates directory 2017-09-17 19:11:06 +09:00
Jaeseung Ha
4394142d3f Merge branch 'master' into fix_libssl_example 2017-09-17 19:14:40 +09:00
Jaeseung Ha
13fdc9390b Merge pull request #202 from Rasie1/master
Conflict with std namespace
2017-09-17 13:50:50 +09:00
Jerry Coffin
251f0cf0ed Modified websocket example to automatically retrieve server's hostname. 2017-04-11 22:31:36 -07:00
Rasie1
633dc82b8f Add get_dict usage to example 2017-03-16 19:27:19 +03:00
Anders Åslund
5921ccd0ed Fix linking error on OSX
Fix websocket example
2016-10-15 20:26:12 +02:00
yorickdewid
f4f6b02403 Set cast type without dereferencing pointer 2016-10-03 13:47:22 +02:00