-
Notifications
You must be signed in to change notification settings - Fork 21
/
test_api.routing.yml
29 lines (25 loc) · 777 Bytes
/
test_api.routing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Test API endpoints
test_api.get:
path: 'my-api/get.json'
defaults: { _controller: '\Drupal\test_api\Controller\TestAPIController::get_example' }
methods: [GET]
requirements:
_access: 'TRUE'
test_api.put:
path: 'my-api/put.json'
defaults: { _controller: '\Drupal\test_api\Controller\TestAPIController::put_example' }
methods: [PUT]
requirements:
_access: 'TRUE'
test_api.post:
path: 'my-api/post.json'
defaults: { _controller: '\Drupal\test_api\Controller\TestAPIController::post_example' }
methods: [POST]
requirements:
_access: 'TRUE'
test_api.delete:
path: 'my-api/delete.json'
defaults: { _controller: '\Drupal\test_api\Controller\TestAPIController::delete_example' }
methods: [DELETE]
requirements:
_access: 'TRUE'