Add empty array as a query param

975 views Asked by At

I'm stucked with this problem: I need to create this url

.../check?variables=[]&last_name=name&...

So I'm using com.ning.http.client.RequestBuilder for building me request I tried doing that way, but it's doesn't work for some reason

RequestBuilder reqBuilder = new RequestBuilder()
                .setUrl(url+"/check")
                .setMethod("GET")
                .setHeader("Bauth-Token", token)
                .addQueryParam("variables","")
                .setQueryParams(params);

Pls, give an advice, what I should do.

1

There are 1 answers

1
Henry On BEST ANSWER

If you want variables to have the value [], why do you set it to an empty string?