|
From: Chris B. <cbr...@re...> - 2014-04-07 12:01:56
|
Are you saying this is preferable to pivoting on custom media-types? I don't care for the versioned-URI scheme because it puts the same resource at multiple URIs and thus the I's are no longer U... On 04/06/2014 08:58 AM, Bill Burke wrote: > Resteasy cannot dispatch based on header, but I don't recommend a custom > header anyways. The best practice solution is to use URIs i.e. > /v1.0/api and have your client driven by links. You should also make > your apis and media types backward compatible. Its just good practice > no matter what type of API, REST, Java, or whatever you're doing. > > A custom header can often be removed by proxies. For CORS requests, you > also have to write custom code to handle custom headers on the server-side. > > > On 4/6/2014 8:06 AM, Aleš Bregar wrote: >> Hi, >> >> was going through docs on version 2.3.x but couldn't find appropriate >> answer on may issue. >> >> I would like to produce versioned api where uri does not change. The >> idea is to intercept resource locating before auto match happen and >> decide which method to invoke based on some custom header (eq. >> Api.Version=x). >> >> I have found that this can also be achieved by using Accept header >> (where version info may be stated) but I am not truly convinced due I >> would like to produce plain application/json. >> >> Or if my idea with custom header presented above is ok, how the scenario >> may be produced by using resteasy. >> PreProcess interceptor seems not right as it intercepts after regex >> match to method happen. >> >> Thank you in advance >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> Resteasy-users mailing list >> Res...@li... >> https://lists.sourceforge.net/lists/listinfo/resteasy-users >> > |