/**
 * Converts an array type key values pair into a query string
 * @param	key		The key for the pair
 * @param	values	The array of values for the query
 */
Converts an array type key values pair into a query string
@param	key		The key for the pair
@param	values	The array of values for the query
/ ** * Converts an array type key values pair into a query string * @param key The key for the pair * @param values The array of values for the query * /
func arrayToQuery(key string, data interface{}) string {
    var buf bytes.Buffer
    values := reflect.ValueOf(data)
    for index := 0; index < values.Len(); index++ {
        buf.WriteString(url.QueryEscape(key))
        buf.WriteByte('=')
        value := unirest.ToString(values.Index(index).Interface(), "")
        buf.WriteString(url.QueryEscape(value))
        buf.WriteByte('&')
    }
    s := buf.String()
    if(len(s) < 1) {
        return ""
    }
    return s[0 : len(s)-1]
}
func arrayToQuery ( key string , data interface { } ) string { var buf bytes . Buffer values := reflect . ValueOf ( data ) for index := 0 ; index < values . Len ( ) ; index ++ { buf . WriteString ( url . QueryEscape ( key ) ) buf . WriteByte ( '=' ) value := unirest . ToString ( values . Index ( index ) . Interface ( ) , " " ) buf . WriteString ( url . QueryEscape ( value ) ) buf . WriteByte ( '&' ) } s := buf . String ( ) if ( len ( s ) < 1 ) { return " " } return s [ 0 : len ( s ) - 1 ] }
Converts an array type key values pair into a query string
@param	key		The key for the pair
@param	values	The array of values for the query
Converts an array type key values pair into a query string @param key The key for the pair @param values The array of values for the query