use of org.jboss.as.quickstarts.jaxrsclient.model.Contact in project quickstart by wildfly.
the class SavedByClientRequestFilter method filter.
@Override
public void filter(ClientRequestContext requestContext) throws IOException {
String method = requestContext.getMethod();
if ("POST".equals(method) && requestContext.hasEntity()) {
Contact contact = (Contact) requestContext.getEntity();
contact.setSavedBy(USERNAME);
requestContext.setEntity(contact);
}
}
Aggregations