Hi,
According to the documentation, "Object Mappers can be configured globally, per config, or on a per-request basis."
I'm trying to achieve a "per request" configuration. I tried this:
HttpResponse<ResponseSignUp> response = Unirest.post(signUpUrl)
.withObjectMapper(new JacksonObjectMapper())
.header("content-type", "application/json")
.header("Accept", "*/*")
.body(params)
.asObject(ResponseSignUp.class);
But all I keep getting is an exception telling me to use the global configuration:
kong.unirest.UnirestException: No Object Mapper Configured. Please config one with Unirest.config().setObjectMapper
Please, what am I missing?
Cheers!
Hi,
According to the documentation, "Object Mappers can be configured globally, per config, or on a per-request basis."
I'm trying to achieve a "per request" configuration. I tried this:
But all I keep getting is an exception telling me to use the global configuration:
kong.unirest.UnirestException: No Object Mapper Configured. Please config one with Unirest.config().setObjectMapperPlease, what am I missing?
Cheers!