short/internal/oas/oas_request_encoders_gen.go

27 lines
412 B
Go
Raw Permalink Normal View History

2024-01-29 18:32:16 +00:00
// Code generated by ogen, DO NOT EDIT.
package oas
import (
"bytes"
"net/http"
"github.com/go-faster/jx"
ht "github.com/ogen-go/ogen/http"
)
func encodeCreateShortURLRequest(
req *CreateShortURLReq,
2024-01-29 18:32:16 +00:00
r *http.Request,
) error {
const contentType = "application/json"
e := new(jx.Encoder)
{
req.Encode(e)
}
encoded := e.Bytes()
ht.SetBody(r, bytes.NewReader(encoded), contentType)
return nil
}