Commit Graph

95 Commits

Author SHA1 Message Date
Lucas David
1e52b0182d ~ Corrected code as mentionned in review comments. 2021-08-11 22:25:58 +02:00
Lucas David
235f2b9ef4 + Added (implicit) constructors for json "supported" types.
+ added corresponding tests.
+ Added json-map examples.
2021-08-09 14:32:51 +02:00
The-EDev
addcce9e93 small fixes, optimizations, and documentation 2021-07-30 13:09:01 +03:00
The-EDev
06c4829ca7 implemented all blueprint features 2021-07-27 10:52:49 +03:00
The-EDev
ea597d804a blueprint specific templates directory now supported 2021-07-07 15:51:04 +03:00
The-EDev
85e4525d67 added custom static directory capability to blueprints (the endpoint remains "<prefix>/static/<filename>") 2021-07-06 01:53:32 +03:00
The-EDev
321f9c7fe6 Merge branch 'master' 2021-07-06 01:51:50 +03:00
The-EDev
408166a06f removed extra semicolon (from @luxe) 2021-07-05 21:04:51 +03:00
The-EDev
165c72f56c fixed issue where disabling crow static directory would also disable all other routes 2021-07-05 12:18:00 +03:00
The-EDev
c46af69f41 Added basic blueprint support (registration and prefix) 2021-07-05 12:14:31 +03:00
odeits
ea07b8ac04
Fix typo in example_with_all.cpp 2021-07-03 17:08:12 +02:00
The-EDev
ca31b85156 added CROW_ENABLE_COMPRESSION macro to enable zlib compression
This makes zlib dependency (which is quite problematic) optional
2021-06-03 17:12:20 +03:00
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