POST results of multiple checkbox selections

What I’m attempting:
There’s a site (NASA ModelWeb) where one can access online models for Earth’s atmosphere (among many other models). I’m writing code to access this to create an atmospheric profile [number density of various constituents vs. height] which would be scraped from the results page into a DataFrame for further use. The process involves submitting a form with all the particulars of the run, receiving the response (which contains a URL to the generated data) and finally, pulling the data off that URL and into my code.

For reference, here’s the link… NRL MSISE-00

The issue:
So… all the standard examples of doing a POST to submit form data in HTTP.jl describe using a Dict to populate the form data.

However, since part of the form is a set of multiple check boxes, the outgoing form data (as revealed by Chrome developer tools) looks like:

…name1=value1&name2=value2&checkboxname=box1value&checkboxname=box5value&checkboxname=box6value&…

Since that would require a Dict with multiple values associated with single key, the paradigm of staging the form data to be submitted by using a Dict poses a bit of a problem.

Has anyone tackled this & solved it?

Alternatively, is there a data structure that maybe my relative noobness in Julia hasn’t encountered yet which would solve this?

Thanks in advance!

Sigh… sometimes taking the effort to type things out like I did triggers my old brain.

The solution is to store the multiple options in an array, then just iterate down the Dict testing the values for whether they’re an array. When you hit an array, you throw in another loop to peel those values out.

form_data = ""

for (i, (k, v)) in enumerate(payload)
    if isa(v, Array) || isa(v, Tuple)
        for w in v
            form_data = form_data * k * "=" * w * "&"
        end
    else
        form_data = form_data * k * "=" * v * "&"
    end
end

But, please, if anyone has a different solution, I’d love to see it.

Thanks again.