Move RnD sample programs to examples dir, rename test_data to example_data, add stubs for server and client

This commit is contained in:
eleksir
2025-10-27 18:14:28 +03:00
parent f8a41a8cb4
commit b0c28ef87f
54 changed files with 10744 additions and 24 deletions

24
vendor/github.com/carlmjohnson/requests/serializer.go generated vendored Normal file
View File

@@ -0,0 +1,24 @@
package requests
import (
"encoding/json"
)
// Serializer is a function
// that can convert arbitrary data
// to bytes in some format.
type Serializer = func(v any) ([]byte, error)
// Deserializer is a function
// that can read data in some format
// and store the result in v.
type Deserializer = func(data []byte, v any) error
var (
// JSONSerializer is used by BodyJSON and Builder.BodyJSON.
// The default serializer may be changed in a future version of requests.
JSONSerializer Serializer = json.Marshal
// JSONDeserializer is used by ToJSON and Builder.ToJSON.
// The default deserializer may be changed in a future version of requests.
JSONDeserializer Deserializer = json.Unmarshal
)