From: Winterer M. <Mar...@sc...> - 2011-07-01 15:32:09
|
Hi! First of all: RESTeasy is a really nice piece of work that really simplified our server REST interface. Good work! Maybe some of you could help us with the following problem: Sometimes our server needs to invoke a GET resource method from within another resource method based on an URL we get from the client. Instead of performing a real 'loopback' HTTP request from the server to itself we want to use the RESTeasy dispatcher together with the mock request and response objects to perform some kind of 'pseudo' request: The mechanism seems to work, but unfortunately after Dispatch.invoke(...) returns, some context objects seem to be confused. For example: Response.seeOther(...) does not convert relative URIs to absolute URIs any more: Is it a good idea to directly use the RESTeasy internal dispatcher? If yes, is this a bug? (I could provide a short JUnit test if required.) If no, what's a good alternative for internal REST requests? Thanks, Mario |