im using java/maven with microprofile to develop an api that will return information of a service that have @Queryparams, but the problem is that the provider of this service need that i sent an empty @Queryparam, like this emptyquery:
https://example.com/reports/server?emptyquery&report=12345
my client code is this:
package ca.com.td.woody.svc.client;
import ca.com.td.woody.svc.provider.UnknownUrlExceptionMapper;
import java.io.InputStream;
import java.net.URL;
import javax.ws.rs.GET;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
@RegisterRestClient()
@RegisterProvider(UnknownUrlExceptionMapper.class)
public interface IGuateFacturasClient {
@GET
@Produces("application/pdf")
InputStream getBill(
@QueryParam("emptyquery") String emptyquery,
@QueryParam("report") String report
);
}
And when i try to execute this client i use this command to do that:
InputStream inputStream = invoiceClient.getBill( null ,"12345");
But, doesnt matter what i sent, always the client says that the empty query is not empty.
What could i do?