# HTTP Server (Go) > net/http, handlers, ServeMux, middleware, request/response, routing, context - 24 interview questions - Mid-Level - [Interview Questions: Go](https://sharpskill.dev/en/technologies/go/interview-questions.md) ## 1. What is the net/http package in Go? **Answer** The net/http package provides functionality for creating HTTP servers and clients. It includes types like http.Server, http.Handler, http.Request, http.ResponseWriter and functions like ListenAndServe. It's Go's standard library for HTTP, used in most web applications without external dependencies. ## 2. How to create a simple HTTP server in Go? **Answer** The http.ListenAndServe function starts an HTTP server on a given port with a handler. It takes two parameters: the address (e.g. ':8080') and a handler (can be nil to use DefaultServeMux). It's the simplest method to start a server, it blocks until an error occurs. ## 3. What is an http.Handler in Go? **Answer** An http.Handler is an interface with a single method ServeHTTP(ResponseWriter, *Request). Any type implementing this method can handle HTTP requests. It's the basic contract for creating custom handlers, middleware and routers. All Go web frameworks use this interface as foundation. ## 21 more questions available - What is the difference between http.Handler and http.HandlerFunc? - What is http.ServeMux used for? Sign up for free: https://sharpskill.dev/en/login ## Other Go interview topics - [Go Basics](https://sharpskill.dev/en/technologies/go/interview-questions/go-basics.md): 25 questions, Junior - [Go Data Structures](https://sharpskill.dev/en/technologies/go/interview-questions/go-data-structures.md): 20 questions, Junior - [Go Interfaces](https://sharpskill.dev/en/technologies/go/interview-questions/go-interfaces.md): 18 questions, Junior - [Error Handling](https://sharpskill.dev/en/technologies/go/interview-questions/error-handling.md): 20 questions, Junior - [Goroutines Basics](https://sharpskill.dev/en/technologies/go/interview-questions/goroutines-basics.md): 20 questions, Junior - [Channels](https://sharpskill.dev/en/technologies/go/interview-questions/channels.md): 22 questions, Junior - [Go Modules](https://sharpskill.dev/en/technologies/go/interview-questions/go-modules.md): 18 questions, Mid-Level - [HTTP Client](https://sharpskill.dev/en/technologies/go/interview-questions/http-client.md): 18 questions, Mid-Level - [JSON Encoding](https://sharpskill.dev/en/technologies/go/interview-questions/json-encoding.md): 20 questions, Mid-Level - [Database/SQL](https://sharpskill.dev/en/technologies/go/interview-questions/database-sql.md): 22 questions, Mid-Level - [Context Package](https://sharpskill.dev/en/technologies/go/interview-questions/context-package.md): 20 questions, Mid-Level - [Testing](https://sharpskill.dev/en/technologies/go/interview-questions/testing.md): 22 questions, Mid-Level - [Concurrency Patterns](https://sharpskill.dev/en/technologies/go/interview-questions/concurrency-patterns.md): 24 questions, Mid-Level - [Sync Primitives](https://sharpskill.dev/en/technologies/go/interview-questions/sync-primitives.md): 22 questions, Mid-Level - [Go Web Frameworks](https://sharpskill.dev/en/technologies/go/interview-questions/go-web-frameworks.md): 20 questions, Mid-Level - [REST API Design](https://sharpskill.dev/en/technologies/go/interview-questions/rest-api-design.md): 20 questions, Mid-Level - [gRPC](https://sharpskill.dev/en/technologies/go/interview-questions/grpc.md): 22 questions, Mid-Level - [Reflection](https://sharpskill.dev/en/technologies/go/interview-questions/reflection.md): 20 questions, Senior - [Memory Management](https://sharpskill.dev/en/technologies/go/interview-questions/memory-management.md): 24 questions, Senior - [Performance Optimization](https://sharpskill.dev/en/technologies/go/interview-questions/performance-optimization.md): 22 questions, Senior - [Generics](https://sharpskill.dev/en/technologies/go/interview-questions/generics.md): 20 questions, Senior - [Go Design Patterns](https://sharpskill.dev/en/technologies/go/interview-questions/design-patterns.md): 24 questions, Senior - [Microservices](https://sharpskill.dev/en/technologies/go/interview-questions/microservices.md): 24 questions, Senior - [Security & Authentication](https://sharpskill.dev/en/technologies/go/interview-questions/security-authentication.md): 24 questions, Senior - [Docker & Containerization](https://sharpskill.dev/en/technologies/go/interview-questions/docker-containerization.md): 20 questions, Senior - [Kubernetes Basics](https://sharpskill.dev/en/technologies/go/interview-questions/kubernetes-basics.md): 22 questions, Senior - [Advanced Go](https://sharpskill.dev/en/technologies/go/interview-questions/advanced-go.md): 20 questions, Senior - [CLI Development](https://sharpskill.dev/en/technologies/go/interview-questions/cli-development.md): 20 questions, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/en/technologies/go/interview-questions/http-server