@@ -170,7 +170,17 @@ class CoRouterFunctionDsl internal constructor (private val init: (CoRouterFunct
170
170
171
171
/* *
172
172
* Adds a route to the given handler function that handles all HTTP `GET` requests
173
- * that match the given pattern.
173
+ * that match the given predicate.
174
+ * @param predicate predicate to match
175
+ * @since 6.1.4
176
+ */
177
+ fun GET (predicate : RequestPredicate , f : suspend (ServerRequest ) -> ServerResponse ) {
178
+ builder.GET (predicate, asHandlerFunction(f))
179
+ }
180
+
181
+ /* *
182
+ * Adds a route to the given handler function that handles all HTTP `GET` requests
183
+ * that match the given pattern and predicate.
174
184
* @param pattern the pattern to match to
175
185
* @param predicate additional predicate to match
176
186
* @since 5.2
@@ -197,7 +207,17 @@ class CoRouterFunctionDsl internal constructor (private val init: (CoRouterFunct
197
207
198
208
/* *
199
209
* Adds a route to the given handler function that handles all HTTP `HEAD` requests
200
- * that match the given pattern.
210
+ * that match the given pattern and predicate.
211
+ * @param predicate predicate to match
212
+ * @since 6.1.4
213
+ */
214
+ fun HEAD (predicate : RequestPredicate , f : suspend (ServerRequest ) -> ServerResponse ) {
215
+ builder.HEAD (predicate, asHandlerFunction(f))
216
+ }
217
+
218
+ /* *
219
+ * Adds a route to the given handler function that handles all HTTP `HEAD` requests
220
+ * that match the given pattern and predicate.
201
221
* @param pattern the pattern to match to
202
222
* @param predicate additional predicate to match
203
223
* @since 5.2
@@ -224,7 +244,17 @@ class CoRouterFunctionDsl internal constructor (private val init: (CoRouterFunct
224
244
225
245
/* *
226
246
* Adds a route to the given handler function that handles all HTTP `POST` requests
227
- * that match the given pattern.
247
+ * that match the given predicate.
248
+ * @param predicate predicate to match
249
+ * @since 6.1.4
250
+ */
251
+ fun POST (predicate : RequestPredicate , f : suspend (ServerRequest ) -> ServerResponse ) {
252
+ builder.POST (predicate, asHandlerFunction(f))
253
+ }
254
+
255
+ /* *
256
+ * Adds a route to the given handler function that handles all HTTP `POST` requests
257
+ * that match the given pattern and predicate.
228
258
* @param pattern the pattern to match to
229
259
* @param predicate additional predicate to match
230
260
* @since 5.2
@@ -251,7 +281,17 @@ class CoRouterFunctionDsl internal constructor (private val init: (CoRouterFunct
251
281
252
282
/* *
253
283
* Adds a route to the given handler function that handles all HTTP `PUT` requests
254
- * that match the given pattern.
284
+ * that match the given predicate.
285
+ * @param predicate predicate to match
286
+ * @since 6.1.4
287
+ */
288
+ fun PUT (predicate : RequestPredicate , f : suspend (ServerRequest ) -> ServerResponse ) {
289
+ builder.PUT (predicate, asHandlerFunction(f))
290
+ }
291
+
292
+ /* *
293
+ * Adds a route to the given handler function that handles all HTTP `PUT` requests
294
+ * that match the given pattern and predicate.
255
295
* @param pattern the pattern to match to
256
296
* @param predicate additional predicate to match
257
297
* @since 5.2
@@ -278,7 +318,17 @@ class CoRouterFunctionDsl internal constructor (private val init: (CoRouterFunct
278
318
279
319
/* *
280
320
* Adds a route to the given handler function that handles all HTTP `PATCH` requests
281
- * that match the given pattern.
321
+ * that match the given pattern and predicate.
322
+ * @param predicate predicate to match
323
+ * @since 6.1.4
324
+ */
325
+ fun PATCH (predicate : RequestPredicate , f : suspend (ServerRequest ) -> ServerResponse ) {
326
+ builder.PATCH (predicate, asHandlerFunction(f))
327
+ }
328
+
329
+ /* *
330
+ * Adds a route to the given handler function that handles all HTTP `PATCH` requests
331
+ * that match the given pattern and predicate.
282
332
* @param pattern the pattern to match to
283
333
* @param predicate additional predicate to match
284
334
* @since 5.2
@@ -307,7 +357,17 @@ class CoRouterFunctionDsl internal constructor (private val init: (CoRouterFunct
307
357
308
358
/* *
309
359
* Adds a route to the given handler function that handles all HTTP `DELETE` requests
310
- * that match the given pattern.
360
+ * that match the given predicate.
361
+ * @param predicate predicate to match
362
+ * @since 6.1.4
363
+ */
364
+ fun DELETE (predicate : RequestPredicate , f : suspend (ServerRequest ) -> ServerResponse ) {
365
+ builder.DELETE (predicate, asHandlerFunction(f))
366
+ }
367
+
368
+ /* *
369
+ * Adds a route to the given handler function that handles all HTTP `DELETE` requests
370
+ * that match the given pattern and predicate.
311
371
* @param pattern the pattern to match to
312
372
* @param predicate additional predicate to match
313
373
* @since 5.2
@@ -336,7 +396,17 @@ class CoRouterFunctionDsl internal constructor (private val init: (CoRouterFunct
336
396
337
397
/* *
338
398
* Adds a route to the given handler function that handles all HTTP `OPTIONS` requests
339
- * that match the given pattern.
399
+ * that match the given predicate.
400
+ * @param predicate predicate to match
401
+ * @since 6.1.4
402
+ */
403
+ fun OPTIONS (predicate : RequestPredicate , f : suspend (ServerRequest ) -> ServerResponse ) {
404
+ builder.OPTIONS (predicate, asHandlerFunction(f))
405
+ }
406
+
407
+ /* *
408
+ * Adds a route to the given handler function that handles all HTTP `OPTIONS` requests
409
+ * that match the given pattern and predicate.
340
410
* @param pattern the pattern to match to
341
411
* @param predicate additional predicate to match
342
412
* @since 5.2
0 commit comments