Popularity
3.7
Growing
Activity
2.7
-
70
3
14

Programming language: Go
License: MIT License
Tags: Networking     HTTP Clients    
Latest version: v0.1.3

go-http-client alternatives and similar packages

Based on the "HTTP Clients" category.
Alternatively, view go-http-client alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of go-http-client or a related project?

Add another 'HTTP Clients' Package

README

go-http-client

An enhanced http client for Golang

Documentation on go.dev 🔗

This package provides you a http client package for your http requests. You can send requests quicly with this package. If you want to contribute this package, please fork and create a pull request.

Installation

$ go get -u github.com/bozd4g/go-http-client/

Example Usage

package main

import (
    "context"
    "log"

    gohttpclient "github.com/bozd4g/go-http-client"
)

type Post struct {
    ID    int    `json:"id"`
    Title string `json:"title"`
}

func main() {
    ctx := context.Background()
    client := gohttpclient.New("https://jsonplaceholder.typicode.com")

    response, err := client.Get(ctx, "/posts/1")
    if err != nil {
        log.Fatalf("error: %v", err)
    }

    var post Post
    if err := response.Json(&post); err != nil {
        log.Fatalf("error: %v", err)
    }

    log.Printf(post.Title) // sunt aut facere repellat provident occaecati...
}

License

Copyright (c) 2020 Furkan Bozdag

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


*Note that all licence references and agreements mentioned in the go-http-client README section above are relevant to that project's source code only.