Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Premature dispatch creates null value body argument when incoming POST is dispatched before body arrives?

On Tue, Apr 23, 2019 at 1:53 AM Patrick Dirks <pdirks@xxxxxxxxxx> wrote:
...
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2019-03-15T17:47:31.462Z")
public class HostsApiServiceImpl extends HostsApiService {
    ...
    @Override
    public Response addHost(HostSpec hs, SecurityContext securityContext) throws NotFoundException {
    ...

and, sure enough, if the header and body are sent together, the ‘hs’ parameter refers to a properly formatted HostSpec with the fields I passed from the client stubs.  When the body is not yet present, however, that parameter is null.  Are you saying I should be explicitly checking for “null” body parameters and manually waiting to receive + deserialize the ‘body’ parameter?

This is a question for the JAX-RS folks. Sorry.

Joakim Erdfelt / joakim@xxxxxxxxxxx

Back to the top