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.
- Minimalistic Syntax
- HTTP and SOCKS Proxies Support
- Multi-part File Uploads
- Caching
- Adjustable Rate Limit and Retries
Slash://
requires go1.23+ to install successfully. Run the following command to install the latest version.
go install -v github.com/shafiqaimanx/slash@latest
import "github.com/shafiqaimanx/slash"
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")
}