Welcome To Golang By Example

Menu
  • Home
  • Blog
  • Contact Us
  • Support this website
Menu

Tag: golang

Return plain text body in HTTP response in Go (Golang)

Posted on July 11, 2021July 11, 2021 by admin

Overview Write method of the ResponseWriter interface in net/http package can be used to set the text/plain body in an HTTP response In GO a response is represented by the ResponseWriter Interface.  Here is…

Return 202 (StatusAccepted) in HTTP response in Go (Golang)

Posted on July 10, 2021July 10, 2021 by admin

Overview net/http package of golang provides the status code constants which could be used to return different status codes- https://golang.org/src/net/http/status.go The same can also be used to return the 202 (StatusAccepted) HTTP…

Return JSON body in HTTP response in Go (Golang)

Posted on July 10, 2021July 11, 2021 by admin

Overview Write method of the ResponseWriter interface in net/http package can be used to set the JSON body in an HTTP response In GO a response is represented by the ResponseWriter Interface.  Here is…

How to set HTTP status code in response in Go (Golang)

Posted on July 10, 2021July 10, 2021 by admin

Overview WriteHeader method of the ResponseWriter interface in net/http package can be used to return the status code from a golang server. In GO a response is represented by the ResponseWriter Interface.  Here is…

Return 500 Status Code or Internal Server Error in HTTP response in Go (Golang)

Posted on July 10, 2021July 10, 2021 by admin

Overview net/http package of golang provides the status code constants which could be used to return different status codes- https://golang.org/src/net/http/status.go The same can also be used to return the 500 (StatusInternalServerError) HTTP…

Return 201 (StatusCreated) Status Code in HTTP response in Go (Golang)

Posted on July 10, 2021July 10, 2021 by admin

Overview net/http package of golang provides the status code constants which could be used to return different status codes- https://golang.org/src/net/http/status.go The same can also be used to return the 201 (StatusCreated) HTTP…

Return 200 (StatusOK) Status Code in HTTP response in Go (Golang) -P

Posted on July 10, 2021July 10, 2021 by admin

Overview net/http package of golang provides the status code constants which could be used to return different status codes- https://golang.org/src/net/http/status.go The same can also be used to return the 200 (StatusOK) HTTP…

Return 403 (Forbidden) Status Code in HTTP response in Go (Golang)

Posted on July 10, 2021July 10, 2021 by admin

Overview net/http package of golang provides the status code constants which could be used to return different status codes- https://golang.org/src/net/http/status.go The same can also be used to return the 403 (Forbidden) HTTP…

Return 401 (UnAuthorized) Status Code in HTTP response in Go (Golang)

Posted on July 10, 2021July 10, 2021 by admin

Overview net/http package of golang provides the status code constants which could be used to return different status codes- https://golang.org/src/net/http/status.go The same can also be used to return the 401 (Unauthorized) HTTP…

Return 404 (Resource Not Found) Status Code in http response in Go (Golang)

Posted on July 10, 2021July 10, 2021 by admin

Overview http package of golang provides the status code constant which could be used to return different status codes- https://golang.org/src/net/http/status.go The same can also be used to return the 404 (Resource Not…

Posts pagination

Previous 1 … 12 13 14 … 41 Next
Follow @golangbyexample

Popular Articles

Golang Comprehensive Tutorial Series

All Design Patterns in Go (Golang)

Slice in golang

Variables in Go (Golang) – Complete Guide

OOP: Inheritance in GOLANG complete guide

Using Context Package in GO (Golang) – Complete Guide

All data types in Golang with examples

Understanding time and date in Go (Golang) – Complete Guide

©2025 Welcome To Golang By Example | Design: Newspaperly WordPress Theme