this repo has no description
1package util
2
3import (
4 "context"
5 "net/http"
6)
7
8const (
9 Query = http.MethodGet
10 Procedure = http.MethodPost
11)
12
13// API client interface used in lexgen.
14//
15// 'method' is the HTTP method type. 'inputEncoding' is the Content-Type for bodyData in Procedure calls. 'params' are query parameters. 'bodyData' should be either 'nil', an [io.Reader], or a type which can be marshalled to JSON. 'out' is optional; if not nil it should be a pointer to a type which can be un-Marshaled as JSON, for the response body.
16type LexClient interface {
17 LexDo(ctx context.Context, method string, inputEncoding string, endpoint string, params map[string]any, bodyData any, out any) error
18}