request_type Derived Type

type, public :: request_type

Representing an HTTP request.


Contents

Source Code


Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: url

The URL of the request

character(len=:), public, allocatable :: data

The data to be send with request

character(len=:), public, allocatable :: form_encoded_str

The URL-encoded form data.

integer, public :: method

The HTTP method of the request.

type(pair_type), public, allocatable :: header(:)

An Array of request headers.

type(pair_type), public, allocatable :: form(:)

An array of fields in an HTTP form.

type(pair_type), public, allocatable :: file

Used to store information about files to be sent in HTTP requests.

integer(kind=int64), public :: timeout

Timeout value for the request in seconds.

type(pair_type), public, allocatable :: auth

Stores the username and password for Authentication


Source Code

    type :: request_type
        !! Representing an **HTTP `request`**.
        character(len=:), allocatable :: url
            !! The URL of the request
        character(len=:), allocatable :: data
            !! The data to be send with request
        character(len=:), allocatable :: form_encoded_str
            !! The URL-encoded form data.
        integer :: method
            !! The HTTP method of the request.
        type(pair_type), allocatable :: header(:)
            !! An Array of request headers.
        type(pair_type), allocatable :: form(:)
            !! An array of fields in an HTTP form.
        type(pair_type), allocatable :: file
            !! Used to store information about files to be sent in HTTP requests.
        integer(kind=int64) :: timeout
            !! **`Timeout`** value for the request in **seconds**.
        type(pair_type), allocatable :: auth
            !! Stores the username and password for Authentication
    end type request_type