Skip to content
/ remote Public

Remote is a structure pawerfull Golang http api that allow us to make some request on avery api or an URL if you want a well organized code, you'll love remote.

License

Notifications You must be signed in to change notification settings

201R/remote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remote Go Reference License: MIT

Remote is a Golang http request package to make request like POST GET PUT ... on a domain or an API

Installation

To install remote package, you need to install Go and set your Go workspace first.

  1. The first need Go installed (version 1.12+ is required), then you can use the below Go command to install Gin.
$ go get -u github.com/201RichK/remote
  1. Import it in your code:
import "github.com/201R/remote"
  1. Quick start
# assume the following codes in example.go file
$ cat example.go
package main

import (
    "github.com/201R/remote"
    "fmt"
)

func main() {
    //Create new config 
    client := remote.NewRemote(remote.Config{})

    res, err := client.GET(remote.Options{
        URL: "https://google.com",
    })

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

    if err := json.NewDecoder(os.Stdout).Decode(res.Body); err != nil {
        fmt.Println(err)
    }
    
}

About

Remote is a structure pawerfull Golang http api that allow us to make some request on avery api or an URL if you want a well organized code, you'll love remote.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages