Object HttpCollection
http Container object for http Storage and organization of header, cookie, query, form, and other data
Inheritance
Operator
operator[String]
Allow direct access to values using key-value subscripts
1Variant HttpCollection[String];
Member function
clear
Clear container data
1HttpCollection.clear();
has
Check whether there is data with the specified key value in the container
1Boolean 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
1Variant 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
1NObject 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
1HttpCollection.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
2HttpCollection.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
2HttpCollection.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
1HttpCollection.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
2HttpCollection.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
2HttpCollection.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 value
1HttpCollection.remove(String name);
Call parameters:
- name: String, specify the key value to be deleted
delete
Delete all values of the specified key value
1HttpCollection.delete(String name);
Call parameters:
- name: String, specify the key value to be deleted
sort
Sort the contents of the container according to the key value
1HttpCollection.sort();
keys
Query the key value in the container
1NArray HttpCollection.keys();
Return result:
- NArray, Returns an array containing all key values
values
Query the value in the container
1NArray 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
1String 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
1Value HttpCollection.toJSON(String key = "");
Call parameters:
- key: String, unused
Return result:
- Value, Returns a value containing JSON serializable