Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the README for this project #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,56 @@ Imitation is the sincerest form of flattery.

But seriously, /~https://github.com/reorx/httpstat is the new hotness, and this is a shameless rip off.

## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Features](#features)
- [Examples](#examples)
- [Use Cases](#use-cases)
- [Running Tests](#running-tests)
- [Building the Project](#building-the-project)
- [CI/CD with GitHub Actions](#cicd-with-github-actions)
- [Contributing](#contributing)

## Installation
`httpstat` requires Go 1.20 or later.
```
go install github.com/davecheney/httpstat@latest
```

### Detailed Installation Instructions

#### Windows
1. Download and install Go from the official website: https://golang.org/dl/
2. Open Command Prompt and run the following command:
```
go install github.com/davecheney/httpstat@latest
```

#### macOS
1. Download and install Go from the official website: https://golang.org/dl/
2. Open Terminal and run the following command:
```
go install github.com/davecheney/httpstat@latest
```

#### Linux
1. Download and install Go from the official website: https://golang.org/dl/
2. Open Terminal and run the following command:
```
go install github.com/davecheney/httpstat@latest
```

### Troubleshooting Installation Issues
- Ensure that Go is installed correctly by running `go version` in your terminal or command prompt.
- Make sure your `GOPATH` and `GOROOT` environment variables are set correctly.
- If you encounter any issues, refer to the official Go installation guide: https://golang.org/doc/install

## Usage
```
httpstat https://example.com/
```

## Features

- Windows/BSD/Linux supported.
Expand All @@ -29,6 +69,54 @@ httpstat https://example.com/
- HTTP/HTTPS proxies supported via the usual `HTTP_PROXY`/`HTTPS_PROXY` env vars (as well as lower case variants).
- Supply your own client side certificate with `-E cert.pem`.

## Examples

### Basic Usage
```
httpstat https://example.com/
```

### Using Custom HTTP Method
```
httpstat -X POST https://example.com/
```

### Providing a Request Body
```
httpstat -X POST -d "key=value" https://example.com/
```

### Adding Extra Request Headers
```
httpstat -H "Authorization: Bearer <token>" https://example.com/
```

## Use Cases

### Measuring Response Time
Use `httpstat` to measure the response time of your web application and identify performance bottlenecks.

### Debugging HTTP Requests
`httpstat` can help you debug HTTP requests by providing detailed timing information for each phase of the request.

### Monitoring API Performance
Monitor the performance of your APIs by regularly running `httpstat` and tracking the response times.

## Running Tests
To run tests, use the following command:
```
go test -race ./...
```

## Building the Project
To build the project using the provided `Makefile`, use the following command:
```
make
```

## CI/CD with GitHub Actions
This project uses GitHub Actions for CI/CD. The workflow is defined in the `.github/workflows/push.yml` file. It runs tests, performs static analysis, and verifies the Go modules.

## Contributing

Bug reports are most welcome, but with the exception of #5, this project is closed.
Expand Down
Loading