我有一个关于URI模板变量的问题。包含路径的URI模板变量?
我需要的形式来管理URI:
http://netlocation:port/application_path/{variable}
变量可以是一个路径本身,即像
this/variable/is/a/path
,这样完整的URI显得
http://netlocation:port/application_path/this/variable/is/a/path
我该如何管理?
我有一个关于URI模板变量的问题。包含路径的URI模板变量?
我需要的形式来管理URI:
http://netlocation:port/application_path/{variable}
变量可以是一个路径本身,即像
this/variable/is/a/path
,这样完整的URI显得
http://netlocation:port/application_path/this/variable/is/a/path
我该如何管理?
使用“+”操作符,以避免逃避“/”字符:
http://netlocation:port/application_path/{+foo}
您可以使用查询参数,只是编码标准方式的路径变量:
http://netlocation:port/application_path?path=%2Fthis%2Fvariable%2Fisapath
这是解决我。 – MaVVamaldo