Skip to content

Python script to check multiple URL routes against an expected HTTP status code. This is just a mirror!

License

Notifications You must be signed in to change notification settings

hirnsturm/http-status-check

Repository files navigation

HTTP Status Check

Python script to check multiple URL routes against an expected HTTP status code.

Requirements

  • Python3 >=3.7
  • pip3

Installation

Install required modules.

$ pip3 install -r requirements.txt

Configuration

Create configuration file.

$ cp dist/config.yaml.dist config.yaml

Fit configuration for your needs.

domain: https://my-domain.com
expectedHttpStatusCode: 200
routes:
  - /index.html
  - /my/sub/dir/index.html

Usage

Run check script with your configuration.

$ python3 http_status_check.py --config=/<path>/config.yaml

Enable debug output by adding --debug flag.

Parameters

--config

--debug

Example

Configuration (./test/config.yaml):

domain: https://www.google.de
expectedHttpStatusCode: 200
routes:
  - /
  - /imghp?hl=de&tab=wi&ogbl

Execution:

$ python3 http_status_check.py --config=./test/config.yaml

Output:

[INFO] Read configuration from ./test/config.yaml
[INFO] Run checks
[OK] https://www.google.de/ returns HTTP status 200
[OK] https://www.google.de/imghp?hl=de&tab=wi&ogbl returns HTTP status 200
[OK] Done.

About

Python script to check multiple URL routes against an expected HTTP status code. This is just a mirror!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages