use of com.linkedin.restli.examples.greetings.client.Exceptions3RequestBuilders in project rest.li by linkedin.
the class TestExceptionsResource3 method testChangeRequestHeaderFromFilter.
// Test that Rest.li request filters can change request headers
@Test
public void testChangeRequestHeaderFromFilter() throws RemoteInvocationException {
Greeting greeting = new Greeting().setId(1L).setMessage("Hello").setTone(Tone.FRIENDLY);
Request<IdResponse<Long>> createRequest = new Exceptions3RequestBuilders().create().input(greeting).build();
Response<IdResponse<Long>> response = getClient().sendRequest(createRequest).getResponse();
Assert.assertEquals(response.getStatus(), HttpStatus.S_201_CREATED.getCode());
}
Aggregations