toQueryString method

String toQueryString()

Serializes the hashtable as a URL query string in the following form:

key1=value1&key2=value2&key3=value3

Each value is URL encoded. The returned string does not include a leading ?.

Important limitations: Key order is not defined, and a hashtable contains only one value per key. Therefore the output is not suitable when parameter order is significant or repeated field names must be preserved. In language bindings where string-return failure is ambiguous, check LastMethodSuccess.

Throws a ChilkatException if the call fails; the details are in ChilkatException.lastErrorText.

Implementation

String toQueryString() {
  final h = _handle;
  final r = _CkHashtable_ToQueryString(h);
  if (r == nullptr) {
    throw _fail('toQueryString');
  }
  return r.toDartString();
}