Commit Graph

108 Commits

Author SHA1 Message Date
The-EDev
7f4b7c8ff9
created new rules, used bot to enforce rules in PRs 2021-11-25 14:45:38 +03:00
The-EDev
f8fabe32ae
fixed runtime error in basic_example 2021-11-22 17:47:02 +03:00
Luca Schlecker
e5c7daccce remove every occurance of #define CROW_MAIN.
Signed-off-by: Luca Schlecker <luca.schlecker@hotmail.com>
2021-11-21 17:25:16 +01:00
The-EDev
85e85c3e64
allow remote IP to be accessed from websocket object 2021-11-01 23:57:21 +03:00
The-EDev
616702d7e8 fixed issue where example_chat wouldn't be able to find example_chat.html due to copying error 2021-10-06 17:24:05 +03:00
Farook Al-Sammarraie
72e33c743e
Merge branch 'master' into revamped_setup 2021-10-02 17:29:07 +03:00
The-EDev
a031fb6c8e added status codes enum 2021-09-30 20:38:23 +03:00
The-EDev
736bc4f074 fixed a problem with compiling example_with_all and added CROW_AMALGAMATE to drone options 2021-09-28 22:03:56 +03:00
Luca Schlecker
f90f9b8e61 fix basic and blueprint example not building on some machines. 2021-09-01 09:29:12 +02:00
Luca Schlecker
28acb2c5a7 rework cmake configs.
See #160 for more info.
2021-09-01 09:29:02 +02:00
The-EDev
576690bf14 Made catchall work with 404 or 405 errors
snuck in a fix for release.py where version name wouldn't change
also snuck in slight improvement in finding blueprint (removed extra if statement)
2021-08-21 04:49:17 +03:00
The-EDev
f5338260bb several changes:
added json list in a similar fashion to json object
renamed object_type to object
updated readme, index.html, and json.md to include objects and lists
updated examples to be slightly cleaner and include lists
replaced instances of json object (std::map and such) with the short version (object)
accurate floating point number dumping (`6.0` instead of `6`) while taking 1/30th of the time (29 microseconds saved)
added json list testing
snuck in utf-8 middleware warning fix
snuck in twitter card style for crowcpp.org site (makes social media cards look way better with a large image)
2021-08-20 03:57:21 +03:00
Lucas David
80e4d3f88f - Removed duplicated in example. 2021-08-16 14:22:23 +02:00
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