NAME

App::MonM::Checkit::HTTP - Checkit HTTP subclass

VIRSION

Version 1.01

SYNOPSIS

<Checkit "foo">

    Enable  yes
    Type    http
    URL     http://www.example.com
    Method  POST
    TimeOut 180
    Target  code
    IsTrue  200
    Content "Blah-Blah-Blah"
    Proxy   "http://http.example.com:8001"
    Set     X-Foo foo
    Set     X-Bar bar

    # . . .

</Checkit>

DESCRIPTION

Checkit HTTP subclass

check

Checkit method. This is backend method of "check" in App::MonM::Checkit

Returns:

code

The HTTP response code: 1xx, 2xx, 3xx, 4xx, 5xx or 0

content

The response content

message

The HTTP response status line

source

Method and URL of request

status

0 if error occured and if code is 4xx or 5xx

1 if no errors and if code is 1xx, 2xx or 3xx

CONFIGURATION DIRECTIVES

The basic Checkit configuration options (directives) detailed describes in "CONFIGURATION DIRECTIVES" in App::MonM::Checkit

Content
Content  "Content for HTTP request"

Specifies POST/PUT/PATCH request content

Example:

Set Content-Type text/plain
Content "Content for POST HTTP request"

Default: no content

Method
Method      GET

Defines the HTTP method: GET, POST, PUT, HEAD, PATCH, DELETE, and etc.

Default: GET

Proxy
Proxy http://http.example.com:8001/

Defines the proxy URL for a http/https requests

Default: no proxy

Set
Set X-Token mdffltrtkmdffltrtk

Defines HTTP request headers. This directive allows you set case sensitive HTTP headers. There can be several such directives.

Examples:

Set User-Agent  "MyAgent/1.00"
Set X-Token     "mdffltrtkmdffltrtk"
Timeout
Timeout    1m

Defines the timeout of HTTP request

Default: 180

URL
URL     https://www.example.com

Defines the URL for HTTP/HTTPS requests

Default: http://localhost

Examples:

URL     https://user:password@www.example.com
URL     https://www.example.com

HISTORY

See Changes file

TO DO

See TODO file

BUGS

* none noted

SEE ALSO

App::MonM

AUTHOR

Serż Minus (Sergey Lepenkov) https://www.serzik.com <abalama@cpan.org>

COPYRIGHT

Copyright (C) 1998-2022 D&D Corporation. All Rights Reserved

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See LICENSE file and https://dev.perl.org/licenses/