Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3747

Quarkus REST Client: How to serialize a query parameter with custom date formatter

$
0
0

I have a REST API to call that expects dates in the format yyyyMMdd

My REST Client code looks like this

@GET@Path("/atl/")RestResponse<AtlResponse> getAtlResponse(    @QueryParam("from") LocalDate from);

and the query parameter gets formatted like this:

from=2021-07-03

I tried

@GET@Path("/atl/")RestResponse<AtlResponse> getAtlResponse(    @QueryParam("from") @DateFormat(pattern="yyyyMMdd") LocalDate from);

but I have the same result.

Of course I could replace with a String and format the date before calling this API but that would be a shame :)

Thanks !


Viewing all articles
Browse latest Browse all 3747

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>