This module contains the
pair_typederived type, designed to store various details likeheaders,fileinformation,form-data, andauthenticationdetails.
A derived type use to store a name-value pair.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=:), | public, | allocatable | :: | name |
Name (key) |
||
| character(len=:), | public, | allocatable | :: | value |
Value |
The function retrieves the value associated with a specified
name from the passed array of pair_type objects (i.e., pair_arr).
The search for the name is case-insensitive. If the name is
not found, the function returns an unallocated string. In the case
of duplicate name entries in the pair_arr, the function returns the
value of the first occurrence of the name.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(pair_type), | intent(in) | :: | pair_arr(:) |
The array in which we want to find a |
||
| character(len=*), | intent(in) | :: | name |
The |
Stores the value of the corresponding pair_type object whose name
attribute is equal to the given name.
Return .true. if there exists a pair_type object inside pair_arr with
a name attribute equal to the provided name; otherwise, return .false..
HTTP pairs are case-insensitive, implying that values are converted to
lowercase before the comparison is performed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(pair_type), | intent(in) | :: | pair_arr(:) |
The array in which we want to find a |
||
| character(len=*), | intent(in) | :: | name |
The |
Appends a new pair_type instance with the provided name
and value into the given pair_type array(i.e pair).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(pair_type), | intent(inout), | allocatable | :: | pair(:) |
An array of |
|
| character(len=*), | intent(in) | :: | name |
The |
||
| character(len=*), | intent(in) | :: | value |
The |