Commit Graph

723 Commits

Author SHA1 Message Date
Dietmar Maurer fc937099b3 remove stale macro 2018-11-16 07:35:19 +01:00
Dietmar Maurer fe476ce884 allow closure handlers 2018-11-15 17:47:59 +01:00
Dietmar Maurer cbbeff1a6d add missing file 2018-11-15 17:07:55 +01:00
Dietmar Maurer f17db0abfd cleanup module names 2018-11-15 17:07:10 +01:00
Dietmar Maurer c0262d7480 rename Jss to Schema 2018-11-15 16:56:28 +01:00
Dietmar Maurer 426a48b04f fix parameter macro for empty object 2018-11-15 16:48:36 +01:00
Dietmar Maurer 8a7005321b improve router 2018-11-15 13:28:15 +01:00
Dietmar Maurer e63e99d646 rename MethodInfo to Router 2018-11-15 11:46:13 +01:00
Dietmar Maurer 10be1d290a avoid macros 2018-11-15 10:57:52 +01:00
Dietmar Maurer 4dcf43d266 rename ApiError into HttpError 2018-11-15 10:42:01 +01:00
Dietmar Maurer 279ecfdfb4 remove unneeded lifetime annotations 2018-11-15 10:25:59 +01:00
Dietmar Maurer f0b10921b8 reorder content 2018-11-15 10:18:01 +01:00
Dietmar Maurer 16b48b81c5 move ApiConfig into extra file 2018-11-15 10:14:08 +01:00
Dietmar Maurer 9bc17e8dcd move server code to api_server.rs, implement Service and NewService 2018-11-15 10:05:37 +01:00
Dietmar Maurer 08bd8d476a remove more test code, cleanups 2018-11-14 17:32:17 +01:00
Dietmar Maurer 98d82428b0 remove asnyc test code 2018-11-14 14:39:01 +01:00
Dietmar Maurer 5599e2633c correctly use Arc pointer 2018-11-14 14:28:54 +01:00
Dietmar Maurer 1a53be1443 factor out server code into api_server.rs 2018-11-14 13:22:33 +01:00
Dietmar Maurer a9696f7beb use Arc for ApiServer 2018-11-14 11:57:01 +01:00
Dietmar Maurer 2c10fd5cb1 simplify code 2018-11-14 11:38:26 +01:00
Dietmar Maurer 324a5bd095 remove service implementation, use service_fn again 2018-11-13 14:47:03 +01:00
Dietmar Maurer a974251ee6 improve error handling, use a Service 2018-11-13 12:36:56 +01:00
Dietmar Maurer 035cce945e remove static directory cache 2018-11-12 14:11:04 +01:00
Dietmar Maurer 198fab6f2a santtize paths in handle_request 2018-11-12 13:19:53 +01:00
Dietmar Maurer a0efdca18b code cleanup 2018-11-11 17:19:24 +01:00
Dietmar Maurer 78d0783b00 handle_static_file_download: optimize small files
Avoid chuncked transfer for small files.
2018-11-11 17:10:42 +01:00
Dietmar Maurer 579fbe7dc8 implement static file download
Fully async using futures and stream.
2018-11-11 15:54:05 +01:00
Dietmar Maurer cec9f02ebc limit allowed body size 2018-11-11 13:24:14 +01:00
Dietmar Maurer 3cdec2a010 use header::CONTENT_TYPE 2018-11-11 12:55:30 +01:00
Dietmar Maurer ef1f0e655a add code to create directory name cache 2018-11-10 17:17:41 +01:00
Dietmar Maurer 3c1d7afc42 another way to read files using tokio_codec 2018-11-10 15:12:45 +01:00
Dietmar Maurer 805aec1572 play around with async tasks 2018-11-10 12:06:39 +01:00
Dietmar Maurer 6639c14bd9 use better http status codes 2018-11-10 10:32:25 +01:00
Dietmar Maurer 260c1ee8c6 cleanup futures 2018-11-10 10:00:48 +01:00
Dietmar Maurer c819ec8dde call api method and return result 2018-11-09 13:48:57 +01:00
Dietmar Maurer b82472c0d2 use futures - first try 2018-11-09 12:14:18 +01:00
Dietmar Maurer 4beaacb6f4 code cleanup 2018-11-07 13:58:09 +01:00
Dietmar Maurer a908292008 implement string enum validation 2018-11-07 13:25:47 +01:00
Dietmar Maurer 0a33b12851 try to reduce space usage in ApiStringFormat by using Box 2018-11-07 13:01:14 +01:00
Dietmar Maurer abbf40fc2e define a separate enum ApiStringFormat 2018-11-07 12:55:33 +01:00
Dietmar Maurer d46287e083 implement string regex matcher 2018-11-07 12:35:52 +01:00
Dietmar Maurer 144f0f5eda remove unnecessary test 2018-11-07 12:16:16 +01:00
Dietmar Maurer 7b5316ddfa improve error messages 2018-11-07 12:14:52 +01:00
Dietmar Maurer 7c32470aea implement some string tests 2018-11-07 12:11:09 +01:00
Dietmar Maurer 08a13bb456 implement integer schema tests 2018-11-07 11:55:08 +01:00
Dietmar Maurer e72677bf50 pass ApiMethod to handler 2018-11-07 11:06:37 +01:00
Dietmar Maurer ab9e6de21c test for required parameters 2018-11-06 14:18:13 +01:00
Dietmar Maurer b8bcc7630c try to write unit test 2018-11-06 13:58:05 +01:00
Dietmar Maurer cfa5886c33 implement simple schema parser 2018-11-06 13:10:10 +01:00
Dietmar Maurer 42d569c186 move url related code back to main.rs 2018-11-06 09:35:11 +01:00