Route not working?
Opened this issue · 0 comments
concentrateddon commented
I've defined the following:
@WebRoute(GET, '/writedevice/<mac>/<target>')
def handleWriteDevice(microWebSrv2, request, args) :
print()
print('Writing device',args['mac'],'to',args['target'])
WriteDevice(args['mac'],args['target'])
request.Response.ReturnOk()
Upon running the project, I can see that the route is registered:
+ [@WebRoute] GET /writedevice/<mac>/<target>
There are no other routes using /writedevice:
Creating WWW routes
+ [@WebRoute] GET /
+ [@WebRoute] GET /getdevicelist
+ [@WebRoute] GET /getschedule
+ [@WebRoute] GET /addschedule/<mac>/<abovebelow>/<light>/<target>
+ [@WebRoute] GET /deleteschedule/<id>
+ [@WebRoute] GET /testlight
+ [@WebRoute] GET /writedevice/<mac>/<target>
However, an incoming request isn't picked up:
WWW: From 192.168.68.81:53110 GET /writedevice/34ab958f6ed40004/100 >> [307] Temporary Redirect
Any suggestions? I feel like I must be doing something wrong with the arguments bit of it, but I can't figure it out.