fiber/client
Kashiwa 435fa42360
♻️ Refactor: Migrate randString to rand v2 (#3329)
* ♻️ Refactor: migrate randString to rand/v2

* 🩹 Fix: golangci-lint
2025-02-25 17:11:46 +01:00
..
README.md
client.go ♻️ Refactor: Rename the Method Names of FormData and FormDatas (#3251) (#3255) 2024-12-19 08:30:13 +01:00
client_test.go
cookiejar.go 🧹 chore: Update documentation for Fiber client (#3249) 2024-12-16 14:25:15 +01:00
cookiejar_test.go
core.go 🧹 chore: Update documentation for Fiber client (#3249) 2024-12-16 14:25:15 +01:00
core_test.go
helper_test.go
hooks.go ♻️ Refactor: Migrate randString to rand v2 (#3329) 2025-02-25 17:11:46 +01:00
hooks_test.go ♻️ Refactor: Migrate randString to rand v2 (#3329) 2025-02-25 17:11:46 +01:00
request.go ♻️ Refactor: Rename the Method Names of FormData and FormDatas (#3251) (#3255) 2024-12-19 08:30:13 +01:00
request_test.go ♻️ Refactor: Rename the Method Names of FormData and FormDatas (#3251) (#3255) 2024-12-19 08:30:13 +01:00
response.go 🧹 chore: Update documentation for Fiber client (#3249) 2024-12-16 14:25:15 +01:00
response_test.go

README.md

Fiber Client

Easy-to-use HTTP client based on fasthttp (inspired by resty and axios)

Features section describes in detail about Resty capabilities

Features

The characteristics have not yet been written.

  • GET, POST, PUT, DELETE, HEAD, PATCH, OPTIONS, etc.
  • Simple and chainable methods for settings and request
  • Request Body can be string, []byte, map, slice
    • Auto detects Content-Type
    • Buffer processing for files
    • Native *fasthttp.Request instance can be accessed during middleware and request execution via Request.RawRequest
    • Request Body can be read multiple time via Request.RawRequest.GetBody()
  • Response object gives you more possibility
    • Access as []byte by response.Body() or access as string by response.String()
  • Automatic marshal and unmarshal for JSON and XML content type
    • Default is JSON, if you supply struct/map without header Content-Type
    • For auto-unmarshal, refer to -
      • Success scenario Request.SetResult() and Response.Result().
      • Error scenario Request.SetError() and Response.Error().
      • Supports RFC7807 - application/problem+json & application/problem+xml
    • Provide an option to override JSON Marshal/Unmarshal and XML Marshal/Unmarshal

Usage

The following samples will assist you to become as comfortable as possible with Fiber Client library.

// Import Fiber Client into your code and refer it as `client`.
import "github.com/gofiber/fiber/client"

Simple GET