8000 GitHub - go-dis/go-requests: 🦄 A simple request client for fetching data made in go
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

go-dis/go-requests

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-requests

🦄 Example

package main

import (
	"fmt"
	"github.com/gominima/go-requests"
)

func main() {
	client := requests.NewRequest("https://random-data-api.com/api/users/random_user", make(map[string]interface{}), make(map[string]string))
	res, err := client.Get()
	if err != nil {
		panic(err)
	}
	fmt.Println(res.Body)
	//response would be something like this
	/*
		{
	  "id": 5105,
	  "uid": "58718d5d-456f-45ac-ac0a-fbda86892afd",
	  "password": "RyhWmkV0TH",
	  "first_name": "Bart",
	  "last_name": "Brekke",
	  "username": "bart.brekke",
	  "email": "bart.brekke@email.com",
	  "avatar": "https://robohash.org/quaeratipsumiste.png?size=300x300&set=set1",
	  "gender": "Non-binary",
	  "phone_number": "+1-268 1-580-929-3581",
	  "social_insurance_number": "355857970",
	  "date_of_birth": "1982-09-08",
	  "employment": {
	    "title": "Community-Services Planner",
	    "key_skill": "Organisation"
	  },
	  "address": {
	    "city": "Hyattside",
	    "street_name": "Erdman Loop",
	    "street_address": "93982 Frederick Lake",
	    "zip_code": "86334",
	    "state": "West Virginia",
	    "country": "United States",
	    "coordinates": {
	      "lat": -82.88119017206014,
	      "lng": 150.2430514904285
	    }
	  },
	  "credit_card": {
	    "cc_number": "4198-3576-9309-1264"
	  },
	  "subscription": {
	    "plan": "Bronze",
	    "status": "Idle",
	    "payment_method": "Bitcoins",
	    "term": "Monthly"
	  }
	}
		**/
}

❓Why Go-requests

Go requests is made for making data fetch wat easier and fun to use, it uses all standard go packages without any other dependency, also is pretty fast and reliable .


⭐ Contributing

If you wanna help grow this project or say a thank you!

  1. Give minima a GitHub star
  2. Fork requests and Contribute
  3. Join our Discord community

About

🦄 A simple request client for fetching data made in go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%
0