开发者

URL as a parameter not working with Apache CXF REST /rest/http://www.google.com/

I have a requirement where I need to pass URL's to a REST API as a parameter. I have tried encoding the url but I still get an HTTP 400 error code. for example

One of my sample REST API is

/rest/pull/{http://www.google.com}/net

I have tried encoding the url which results in

/res开发者_StackOverflow社区t/pull/http%3A%2F%2Fwww.google.com/net

but this still results in an error on the REST call. What do I need to do differently?


Try escaping dots too /rest/pull/http%3A%2F%2Fwww%2Egoogle%2Ecom/net

BTW having rest in your APi does not make it RESTful. Start with defining resources and operations.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜