Object built-in object

Object HttpCollection

http container object, used for storage and organization of http header, cookie, query, form, and other data

Inheritance

Subscript operation

Allow direct access to values ​​using key-value subscripts

1
Variant HttpCollection[String];

Member function

clear

Clear container data

1
HttpCollection.clear();

has

Check whether there is data with the specified key value in the container

1
Boolean HttpCollection.has(String name);

Call parameters:

  • name : String, specify the key value to be checked

Return result:

  • Boolean , returns whether the key value exists

first

Query the first value of the specified key value

1
Variant HttpCollection.first(String name);

Call parameters:

  • name : String, specify the key value to be queried

Return result:

  • Variant , returns the value corresponding to the key value, if it does not exist, returns undefined

all

Query all values ​​of the specified key value

1
NObject HttpCollection.all(String name = "");

Call parameters:

  • name : String, specify the key value to be queried, pass an empty string to return the result of all key values

Return result:

  • NObject , returns an array of all values ​​corresponding to the key value, if the data does not exist, returns null

add

Add a key-value data, adding data does not modify the existing key-value data

1
HttpCollection.add(Object map);

Call parameters:

  • map : Object, specify the key-value data dictionary to be added

Add a set of key-value data, adding data does not modify the existing key-value data

1 2
HttpCollection.add(String name, Array values);

Call parameters:

  • name : String, specify the key value to be added
  • values : Array, specify a set of data to be added

Add a key-value data, adding data does not modify the existing key-value data

1 2
HttpCollection.add(String name, Variant value);

Call parameters:

  • name : String, specify the key value to be added
  • value : Variant, specify the data to be added

set

Set a key value data, the setting data will modify the first value corresponding to the key value, and clear the remaining data of the same key value

1
HttpCollection.set(Object map);

Call parameters:

  • map : Object, specify the key value data dictionary to be set

Set a set of data of a key value, the setting data will modify the value corresponding to the key value, and clear the remaining data of the same key value

1 2
HttpCollection.set(String name, Array values);

Call parameters:

  • name : String, specify the key value to be set
  • values : Array, specify a set of data to be set

Set a key value data, the setting data will modify the first value corresponding to the key value, and clear the remaining data of the same key value

1 2
HttpCollection.set(String name, Variant value);

Call parameters:

  • name : String, specify the key value to be set
  • value : Variant, specify the data to be set

remove

Delete all values ​​of the specified key

1
HttpCollection.remove(String name);

Call parameters:

  • name : String, specify the key to be deleted

delete

Delete all values ​​of the specified key

1
HttpCollection.delete(String name);

Call parameters:

  • name : String, specify the key to be deleted

sort

Sort the contents of the container by key value

1
HttpCollection.sort();

keys

Query the key value in the container

1
NArray HttpCollection.keys();

Return result:

  • NArray , returns an array containing all key values

values

Query the value in the container

1
NArray HttpCollection.values();

Return result:

  • NArray , returns an array containing all values

toString

Returns the string representation of the object, generally returns "[Native Object]", the object can be re-implemented according to its own characteristics

1
String HttpCollection.toString();

Return result:

  • String , returns the string representation of the object

toJSON

Returns the JSON format representation of the object, generally returns a collection of readable attributes defined by the object

1
Value HttpCollection.toJSON(String key = "");

Call parameters:

  • key : String, unused

Return result:

  • Value , returns a value containing JSON serializable