public String getResponseAsString() { return connection.getContentAsString(); }
public String getResponseAsString() { return connection.getContentAsString(); }
public FacesRequest submit() throws MalformedURLException, FacesException { if (!connection.isFinished()) { throw new IllegalStateException(); } // Extract VIEW_STATE value. Map<String, String> fields = getHiddenFields(connection.getContentAsString()); if (!fields.containsKey(ResponseStateManager.VIEW_STATE_PARAM)) { throw new FacesException("No view state field in response"); } FacesRequest facesRequest = createFacesRequest(connection.getRequest().getRequestURL().toString()) .withViewId(viewId); facesRequest.connection.setRequestMethod(HttpMethod.POST); for (Map.Entry<String, String> entry : fields.entrySet()) { facesRequest.withParameter(entry.getKey(), entry.getValue()); } return facesRequest; }
public FacesRequest submit() throws MalformedURLException, FacesException { if (!connection.isFinished()) { throw new IllegalStateException(); } // Extract VIEW_STATE value. Map<String, String> fields = getHiddenFields(connection.getContentAsString()); if (!fields.containsKey(ResponseStateManager.VIEW_STATE_PARAM)) { throw new FacesException("No view state field in response"); } FacesRequest facesRequest = createFacesRequest(connection.getRequest().getRequestURL().toString()) .withViewId(viewId); facesRequest.connection.setRequestMethod(HttpMethod.POST); for (Map.Entry<String, String> entry : fields.entrySet()) { facesRequest.withParameter(entry.getKey(), entry.getValue()); } return facesRequest; }