/rest

This repository contains the built'n RESTful render types like JSON,XML and so on for the Iris web framework

Primary LanguageGoOtherNOASSERTION

Repository information

This repository contains the restful types context's rendering for Iris web framework and fasthttp. The idea of this came from unrolled/render, which I had the time to convert it for fasthttp & iris & improve even more its performance and usability.

Quick look

// small example for json rendering, same for all other

package main

import (
	"github.com/kataras/iris"
)

func main() {
	iris.Get("/hi_json", func(ctx *iris.Context) {
		ctx.JSON(iris.StatusOK, iris.Map{
			"Name": "Iris",
			"Age":  2,
		}) // ctx.XML, ctx.Data, ctx.Text, ctx.JSONP...
	})

	iris.Listen(":8080")
}

How to use

License

This project is licensed under the MIT License.

License can be found here.