🔨 Refactor all requests package logic.

- Replace net/http with fasthttp in the requests package.
This commit is contained in:
2024-07-21 19:40:16 +04:00
parent 61ff1d5941
commit 670d07bda2
7 changed files with 491 additions and 337 deletions

View File

@ -2,6 +2,7 @@ package config
import (
"fmt"
"net/url"
"os"
"time"
@ -23,9 +24,9 @@ type IConfig interface {
MergeConfigs(newConfig IConfig) IConfig
}
type DodoConfig struct {
type RequestConfig struct {
Method string
URL string
URL *url.URL
Timeout time.Duration
DodosCount int
RequestCount int
@ -36,7 +37,7 @@ type DodoConfig struct {
Body string
}
func (config *DodoConfig) Print() {
func (config *RequestConfig) Print() {
t := table.NewWriter()
t.SetOutputMirror(os.Stdout)
t.SetStyle(table.StyleLight)