@@ -54,7 +54,7 @@ def rest_configure(self):
54
54
config .add_route ("rest_configuration" , self .rest_base_url + "/configuration/" ,
55
55
request_method = ["GET" , "OPTIONS" ])
56
56
config .add_view (self ._rest_robot_configuration , route_name = "rest_configuration" )
57
- config .add_route ("rest_motion" , self .rest_base_url + "/motion/" , request_method = "GET" )
57
+ config .add_route ("rest_motion" , self .rest_base_url + "/motion/" , request_method = [ "GET" , "OPTIONS" ] )
58
58
config .add_view (self ._rest_robot_motion , route_name = "rest_motion" )
59
59
config .add_route ("rest_status" , self .rest_base_url + "/status/" , request_method = "GET" )
60
60
config .add_view (self ._rest_robot_status , route_name = "rest_status" )
@@ -136,6 +136,8 @@ def _rest_robot_configuration(self, root, request):
136
136
return Response (json_body = self .configuration )
137
137
138
138
def _rest_robot_motion (self , root , request ):
139
+ if request .method == "OPTIONS" :
140
+ return Response (json_body = {})
139
141
if self .motion_configuration is None :
140
142
return Response (json_body = {"detail" : "Motion configuration not found." }, status = 404 )
141
143
return Response (json_body = self .motion_configuration )
0 commit comments