n0str / gorequests

GoRequests: HTTP requests for Humans

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GoRequests: HTTP for Humans

GoRequests is the library that simplifies HTTP requests. It was developed
in the image of famous Python requests library.

It is as simple as:

package main

import (
	"github.com/n0str/gorequests"
	"log"
)

func main() {
	http := http_session.New()
	r := http.EasyRequest("GET", "https://httpbin.org/ip")
	log.Printf("Response: %v", r.EasyJson())
	log.Printf("Response: %v", r.EasyString())
}

Results:

>>> Response: map[origin:178.70.140.98, 178.70.140.98]
>>> Response: {
  "origin": "178.70.140.98, 178.70.140.98"
}

About

GoRequests: HTTP requests for Humans

License:MIT License


Languages

Language:Go 100.0%