Golang: Get HTTP Response as a String
When you read a response it is in []byte format but you can convert it to string simply by using string() function: Use this snippet… Read More »Golang: Get HTTP Response as a String
When you read a response it is in []byte format but you can convert it to string simply by using string() function: Use this snippet… Read More »Golang: Get HTTP Response as a String
Create a new Decoder from json package and pass the request body to it! Simple, simple, simple. Try this snippet and enjoy:
Just use this snippet which sends a post request with a JSON body. It saves your time :). I know you are not comfortable with… Read More »Golang HTTP Request With JSON Body
Golang is very good at making and responding to requests 🙂 Request struct has a Header type that implements this Set method: A working example… Read More »Golang HTTP Request Header Example