http_request Module

This module defines the request_type derived type, which represents an HTTP request.


Uses


Contents


Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: HTTP_GET = 1
integer, public, parameter :: HTTP_HEAD = 2
integer, public, parameter :: HTTP_POST = 3
integer, public, parameter :: HTTP_PUT = 4
integer, public, parameter :: HTTP_DELETE = 5
integer, public, parameter :: HTTP_PATCH = 6

Derived Types

type, public ::  request_type

Representing an HTTP request.

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