def build_get_url(base_url, params, overwrite=False):
qs_base = []<EOL>if base_url.find('<STR_LIT:?>') != -<NUM_LIT:1>:<EOL><INDENT>qs_base = cgi.parse_qsl(base_url.split('<STR_LIT:?>')[<NUM_LIT:1>])<EOL><DEDENT>qs_params = []<EOL>for key, value in six.iteritems(params):<EOL><INDENT>qs_params.append((key, value))<EOL><DEDENT>qs = qs_add = []<EOL>if overwrite is True:<EOL><INDENT>qs = qs_params<EOL>qs_add = qs_base<EOL><DEDENT>else:<EOL><INDENT>qs = qs_base<EOL>qs_add = qs_params<EOL><DEDENT>pars = [x[<NUM_LIT:0>] for x in qs]<EOL>for key, value in qs_add:<EOL><INDENT>if key not in pars:<EOL><INDENT>qs.append((key, value))<EOL><DEDENT><DEDENT>urlqs = urlencode(tuple(qs))<EOL>return base_url.split('<STR_LIT:?>')[<NUM_LIT:0>] + '<STR_LIT:?>' + urlqs<EOL>
Utility function to build a full HTTP GET URL from the service base URL and a dictionary of HTTP parameters.

    TODO: handle parameters case-insensitive?

    @param overwrite: boolean flag to allow overwrite of parameters of the base_url (default: False)