Skip to content
forked from lafikl/fluent

Fluent HTTP client for Golang. With timeout, retries and exponential back-off support.

License

Notifications You must be signed in to change notification settings

yashsarma/fluent

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fluent

Fluent HTTP client for Golang. With timeout, retries and exponential back-off support.

Usage:

package main

import (
  "fmt"
  "github.com/lafikl/fluent"
  "time"
)

func main() {
  req := fluent.New()
  req.Post("http://example.com").
    InitialInterval(time.Duration(time.Millisecond)).
    Json([]int{1, 3, 4}).
    Retry(3)

  res, err := req.Send()

  if err != nil {
    fmt.Println(err)
  }

  fmt.Println("donne ", res)

  // They can be separated if you don't like chaining ;)
  // for example:
  // req.Get("http://example.com")
  // req.Retry(3)
}

http://godoc.org/github.com/lafikl/fluent

About

Fluent HTTP client for Golang. With timeout, retries and exponential back-off support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%