go-gamp icon indicating copy to clipboard operation
go-gamp copied to clipboard

none of producers registered. try application/x-www-form-urlencoded

Open przmv opened this issue 8 years ago • 0 comments

Trying to run the example from README:

package main

import (
	"context"
	"log"

	"github.com/AlekSi/pointer"
	gamp "github.com/olebedev/go-gamp"
	"github.com/olebedev/go-gamp/client/gampops"
)

func main() {
	client := gamp.New(context.Background(), "UA-123456789-1")
	err := client.Collect(
		gampops.NewCollectParams().
			WithCid(pointer.ToString("42")).
			WithT("event").
			WithEc(pointer.ToString("Category")).
			WithEa(pointer.ToString("Action")),
	)
	if err != nil {
		log.Fatal(err)
	}
}

but got the following error:

$ go run main.go
2018/04/19 20:31:23 none of producers: map[application/json:0x71ea60 application/xml:0x71f710 text/plain:0x71f030 application/octet-stream:0x71e280] registered. try application/x-www-form-urlencoded
exit status 1

przmv avatar Apr 19 '18 17:04 przmv