package
2.2.4+incompatible
Repository: https://github.com/goadesign/examples.git
Documentation: pkg.go.dev

# README

goa v2 Encodings Example

This simple example demonstrates HTTP responses with the 'text/html' content type encoding. It consists of a simple endpoint that concatenates strings.

Design

Objects cannot be encoded with 'text/html', so the design illustrates several ways to specify a text response that will be compatible with the encoding. For example, a response type String:

Result(String)

HTTP(func() {
    // The payload fields are encoded as path parameters.
    GET("/concatstrings/{a}/{b}")
    Response(StatusOK, func() {
        // Respond with text/html
        ContentType("text/html")
    })
})

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

NewText returns the text service implementation.