Serialize value as querystring representation, and append or set on `Request.options.url`

@param  {String|Object} value
@return {Object}
182842
function (value) {
        if (is(value).a(Object)) value = Unirest.serializers.form(value)
        if (!value.length) return $this
        $this.options.url += (does($this.options.url).contain('?') ? '&' : '?') + value
        return $this
      }
677245
function( name, value ) {
					if ( completed == null ) {
						name = requestHeadersNames[ name.toLowerCase() ] =
							requestHeadersNames[ name.toLowerCase() ] || name;
						requestHeaders[ name ] = value;
					}
					return this;
				}
452834
function (value) {
  if (typeof value === 'object' && value !== null) {
    if (_.size(value) <= 2
        && _.all(value, function (v, k) {
          return typeof k === 'string' && k.substr(0, 1) === '$';
        })) {
      for (var i = 0; i < builtinConverters.length; i++) {
        var converter = builtinConverters[i];
        if (converter.matchJSONValue(value)) {
          return converter.fromJSONValue(value);
        }
      }
    }
  }
  return value;
}
779641
function append (value, string) {
  if (
    value === null || value === undefined || value === '' ||
    string === null || string === undefined
  ) {
    return value
  }
  return value + string
}
1229355
function ValueToString(value) {
    if (value && typeof value === "object" && value.constructor === Array) {
      return JSON.stringify(value);
    }

    if (value && typeof value === "object" && value.constructor === Object) {
      return JSON.stringify(value);
    }

    /**
     * seeing some really weird cases where the above fail but "" + value
     * returns '[object Object]'
     */
    if (value && typeof value === "object") {
      return JSON.stringify(value);
    }

    if (value === null || typeof value === "undefined") {
      return "";
    }

    if (typeof value === "boolean") {
      if (value) {
        return "true";
      } else {
        return "false";
      }
    }

    if (typeof value === "number" && isFinite(value)) {
      return value.toString();
    }

    if (!!(value && value.constructor && value.call && value.apply)) {
      return value.toString();
    }

    return "" + value;
  }
277015
function serializeData(options) {
    if (options.processData && options.data && $.type(options.data) != "string")
      options.data = $.param(options.data, options.traditional)
    if (options.data && (!options.type || options.type.toUpperCase() == 'GET'))
      options.url = appendQuery(options.url, options.data)
  }
1031088
public static String encode(String value) {
        if (value == null) {
            return value;
        }
        try {
            value = URLEncoder.encode(value, Constants.UTF_8);
        } catch (UnsupportedEncodingException e) {
            // Do nothing - UTF-8 should always be supported
        }
        return value;
    }
952018
def serialize_value(self, value):
        
        # Create a list of serialize methods to run the value through
        serialize_methods = [
            self.serialize_model,
            self.serialize_json_string,
            self.serialize_list,
            self.serialize_dict
        ]

        # Run all of our serialize methods over our value
        for serialize_method in serialize_methods:
            value = serialize_method(value)

        # Return the serialized context value
        return value
1020049
public PactDslJsonArray stringValue(String value) {
      if (value == null) {
        body.put(JSONObject.NULL);
      } else {
        body.put(value);
      }
      return this;
    }
410
private void encodeObject(StringBuffer result, Object value) {
    if (value != null) {
      if (value instanceof byte[]) {
        result.append("[]");
        HexString.binToHex((byte[])value, 0, ((byte[])value).length, result);
      } else
        URLEncode(result, value.toString());
    }
865025
function serializeObject(value: mixed): mixed {
  if (typeof value === 'object' && value !== null) {
    if (typeof value.valueOf === 'function') {
      const valueOfResult = value.valueOf();
      if (typeof valueOfResult !== 'object') {
        return valueOfResult;
      }
    }
    if (typeof value.toJSON === 'function') {
      // $FlowFixMe(>=0.90.0)
      return value.toJSON();
    }
  }
  return value;
}
1071064
function genQueryString (options) {

    if ( !options.queryParams ) {
        return "";
    }

    log(options.verbose,"Now generating query string value ...");

    var queryStringParams = [];

    Object.keys(options.queryParams).forEach(function (key) {
        queryStringParams.push(createEncodedParam(key,options.queryParams[key]));
    });

    var queryString = "?";

    log(options.verbose,"Query string key/value pairs are:");

    for ( var i=0; i<queryStringParams.length; i++ ) {
        log(options.verbose,"  "+queryStringParams[i].key+"="+queryStringParams[i].value);
        queryString += queryStringParams[i].key+"="+queryStringParams[i].value;
        if ( queryStringParams[i+1] ) {
            queryString += "&";
        }
    }

    log(options.verbose,"Query string value is: "+queryString);

    return queryString;
}
955312
function stringify (input, value) {
  input.push(JSON.stringify(value))
  input.push(null)
}
39470
function(url, key, value) {
    var queryStrPos = url.indexOf('?');
    var anchorStrPos = url.lastIndexOf('#');
    
    var paramSeparator = '&';
    
    if(queryStrPos < 0) {
        // There's no query string.
        paramSeparator = '?';
    }
    
    if (anchorStrPos > 0) {
        // There's an anchor at the end, we need to insert our parameter before it
        var urlBeforeAnchor = url.substring(0, anchorStrPos);
        var urlAnchor = url.substring(anchorStrPos);
        return urlBeforeAnchor + paramSeparator + key + '=' + value + urlAnchor;
    } else {
        return url + paramSeparator + key + '=' + value;
    }
}
591931
function decodeDataUrlFromQueryParam(value) {
  if (typeof value !== 'string') {
    return undefined
  }
  const maybeDataUrl = prependPrefix(value, 'data:')
    .replace(/ /g, '+')
    .replace(/\s/g, '')
  return isDataUrl(maybeDataUrl) ? maybeDataUrl : undefined
}
566839
function queryStringToObject(queryString) {
        var pairs = queryString.split('&');
        var result = {};
        pairs.forEach(function (pair) {
            pair = pair.split('=');
            result[pair[0]] = decodeURIComponent(pair[1] || '');
        });
        return JSON.parse(JSON.stringify(result));
    }
617941
function serializeData(options) {
    if (isObject(options.data)) options.data = $.param(options.data)
    if (options.data && (!options.type || options.type.toUpperCase() == 'GET'))
      options.url = appendQuery(options.url, options.data)
  }