Rest API - Versioning Strategies
Consider this code snippet for versioning:
What error will occur if the client calls
def api_handler(request):
version = request.GET['version']
if version == '1':
return 'Version 1'
else:
return 'Other version'What error will occur if the client calls
/api/data without a version parameter?