Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 766 Bytes

README.md

File metadata and controls

43 lines (29 loc) · 766 Bytes

Poster

A reverse http utility tool to easily send requests to other servers.

go get github.com/Alvarios/poster

Post

Send a post request from go, in application/json format.

package my_package

import "github.com/Alvarios/poster"

func main() {
    payload := map[string]interface{}{
        "message": "hello from go",
    }

    // payload has to be JSON friendly
    res, err := poster.Post("https://www.domain.com/url", payload)
}

Get

Get request to a http server.

package my_package

import "github.com/Alvarios/poster"

func main() {
    res, err := poster.Get("https://www.domain.com/url")
}

Copyright

License MIT, licensed by Kushuh with Alvarios.