Skip to content

shafiqaimanx/slash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


🔍 Overview

Slash:// is a simple and user-friendly HTTP library for Golang.
Its primary goal is to make HTTP requests as easy and intuitive as possible.
Designed with a focus on clean, structured, and hassle-free usage, Slash:// draws inspiration from the simplicity and elegance of Colly's syntax.

🎉 Features

  • Minimalistic Syntax
  • HTTP and SOCKS Proxies Support
  • Multi-part File Uploads
  • Caching
  • Adjustable Rate Limit and Retries

📦 Installation

Slash:// requires go1.23+ to install successfully. Run the following command to install the latest version.

go install -v github.com/shafiqaimanx/slash@latest
Importing into your file:
import "github.com/shafiqaimanx/slash"

👉 Usage

package main

import (
	"fmt"

	"github.com/shafiqaimanx/slash"
)

func main() {
	// Init the SlashClient
	sc := slash.NewSlashClient()

	// OnResponse will print the response body
	sc.OnResponse(func(r *slash.Response) {
		fmt.Printf("Response Body:\n %s\n", r.Body)
	})

	// OnError handling errors
	sc.OnError(func(r *slash.Response, err error) {
		if err != nil {
			fmt.Printf("Error: %v\n", err)
		}
	})

	// Visiting the URL
	sc.Visit("https://example.com")
}
Check the examples folder for more detailed examples.

About

Simple HTTP library for Golang, heavily inspired by: https://github.com/gocolly/colly

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages