restful重定向

//302	
@SuppressWarnings("rawtypes")
	@POST
	@Produces(MediaType.APPLICATION_JSON)
	@Path("/callbackRetUrl")
	public javax.ws.rs.core.Response callbackRetUrlRoute(@Context HttpServletRequest request) throws UnsupportedEncodingException, URISyntaxException{
		logger.debug("callbackRoute callbackRoute begin.......");
		return javax.ws.rs.core.Response.status(Status.FOUND).location(new URI("http://localhost/#/account")).build();
	}

 

 

//307
javax.ws.rs.core.Response.temporaryRedirect(new URI("http://localhost/#/account")).build();

 

//303
return javax.ws.rs.core.Response.seeOther(new URI("http://localhost/#/account")).build();

 

你可能感兴趣的:(Restful)