• Stars
    star
    73
  • Rank 418,547 (Top 9 %)
  • Language
    Go
  • License
    MIT License
  • Created over 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An enhanced and lightweight http client for Golang

go-http-client

go-http-client

An enhanced http client for Golang

Documentation on go.dev ๐Ÿ”—

Coverage awesome

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.Unmarshal(&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.

More Repositories

1

FB.EventSourcing

A CQRS and Event Sourcing example repository ๐ŸคŸ
C#
15
star
2

react-native-emoji-dialog

A different dialog approach for React Native ๐Ÿ˜ก ๐Ÿ˜ƒ ๐ŸคŸ
TypeScript
7
star
3

LuisAI-XamarinForms

This repository is for a chatbot project with Xamarin.Forms and Luis.AI
C#
5
star
4

FB.TransactionalOutbox

A sample Transactional Outbox Pattern implementation written with .NET Core.
C#
4
star
5

grapefruit

This repository is a project I made as a hobby. I'm developing using with React.js.
JavaScript
4
star
6

cherry

This repository contains my blog ๐Ÿค™
Go
3
star
7

EksiSozluk.CloneUI

This repository is Eksi Sozluk's cloned interface is one of the largest dictionary platforms of Turkey. I developed with Xamarin.Forms.
C#
3
star
8

bozd4g

๐Ÿฆ„
2
star
9

FB.Debezium

This repository contains a sample of Debezium for Event Sourcing.
Shell
2
star
10

fb.testcontainers

A sample Integration Testing with Docker Containers implementation written with Golang.
Go
2
star
11

dotfiles

Furkan's MacOS Setup
Shell
2
star
12

comparator

comparator is a service to compare prices for a product between sites what you defined in config file
Go
1
star
13

web

A personal blog
HTML
1
star
14

new-tab-extension

This is a sample project written with React and Typescript for Chrome & Mozilla as a new tab extension.
TypeScript
1
star
15

MySimpleBot

This repository is for a simple chatbot framework project
C#
1
star
16

fb.grpc

A sample gRPC implementation written with Golang.
Go
1
star
17

bozd4g.github.io

That's a github page. That url will redirect you to my blog page.
HTML
1
star
18

SkiaSharp

This repository has been created as a sample of SkiaSharp 2D Graphics consumed by Xamarin.Forms application.
C#
1
star
19

CarouselPageSwipeControl

This repository has been created as a sample of Carousel Page Swipe Control consumed by Xamarin.Forms application.
C#
1
star
20

ComputerVisionAPI

This repository has been created as a sample of Microsoft Cognitive Service consumed by Xamarin.Forms application.
C#
1
star
21

avocado

I made best for my blog for now. It was developed with using React.js.
JavaScript
1
star