Uri ? & =

it2022-06-23  81

Uri+方法(GetData)+ ? + key=value & key=value ……

?表示允许不存在,即key可以是不存在的(服务器不接收)

value可以为空,即…?name=&password=123

键值对之间用&(与符号)连接

key之间可以对调位置,无影响,即…?name=zl&password=123…?password=123&name=zl


WCF Rest风格UriTemplate采用"方法名/{参数名}"方式不再使用键值对方式,不支持


例子

 

访问:http://localhost:8733/Design_Time_Addresses/WcfService/Service1/GetEventsByJournalID/1?startLocation=1&endLocation=2 Uri+方法(GetData)+ ? + key=value & key=value ……

 

?表示允许不存在,即key可以是不存在的(服务器不接收)

value可以为空,即…?name=&password=123

键值对之间用&(与符号)连接

key之间可以对调位置,无影响,即…?name=zl&password=123…?password=123&name=zl


WCF Rest风格UriTemplate采用"方法名/{参数名}"方式不再使用键值对方式,不支持


例子

访问:http://localhost:8733/Design_Time_Addresses/WcfService/Service1/GetEventsByJournalID/1?startLocation=1&endLocation=2

转载于:https://www.cnblogs.com/Lulus/p/7872393.html


最新回复(0)