response html
Gerasimos (Makis) Maropoulos edited this page Aug 7, 2020
·
1 revision
Pages 72
- What is Iris
-
📌 Getting Started - Host
- Configuration
- Routing
- HTTP Method Override
- API Versioning
- Content Negotiation
- Response Recorder
- HTTP Referrer
- Request Authentication
- URL Query Parameters
- Forms
- Model Validation
- Cache
- View
- Cookies
- Sessions
- Websockets
- Dependency Injection
- MVC
- gRPC
- Sitemap
- Localization
- Testing
-
🤓 Resources
Clone this wiki locally
Content-Type: "text/html"
The Context.HTML(format, ...args) is the method which sends HTML responses to the client. It accepts the value (like fmt package works).
func handler(ctx iris.Context) {
response := "Hello, <strong>%s!</strong>"
ctx.HTML(response, "World")
}Result
Hello, <strong>World!</strong>If you want to learn how to render template files or embedded views please head over to the View chapter instead.
Home | Project | Quick Start | Technical Docs | Copyright © 2019-2020 Gerasimos Maropoulos. Documentation terms of use.