You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: http.go
    path of file: ./repos/baetyl/plugin/httplink
    
    the code of the file until where you have to start completion: package httplink

import (
	"encoding/json"
	"os"
	"strings"

	"github.com/baetyl/baetyl-go/v2/errors"
	"github.com/baetyl/baetyl-go/v2/http"
	"github.com/baetyl/baetyl-go/v2/log"
	goplugin "github.com/baetyl/baetyl-go/v2/plugin"
	specv1 "github.com/baetyl/baetyl-go/v2/spec/v1"
	"github.com/baetyl/baetyl-go/v2/utils"

	"github.com/baetyl/baetyl/v2/ini
    
func (l *httpLink) Request(msg *specv1.Message) (*specv1.Message, error) {
	l.log.Debug("http link send request", log.Any("message", msg))
	pld, err := json.Marshal(msg.Content)
	if err != nil {
		return nil, errors.Trace(err)
	}
	var data []byte
	res := &specv1.Message{Kind: msg.Kind}
	if msg.Metadata == nil {
		msg.Metadata = map[string]string{}
	}
	msg.Metadata["kind"] = string(msg.Kind)
	switch msg.Kind {
	case specv1.MessageReport, specv1.MessageDeviceReport, specv1.MessageDeviceLifecycleReport:
		data, err = l.post(l.cfg.HTTPLink.ReportURL, pld, msg.Metadata)
		if err != nil {
			return nil, errors.Trace(err)
		}
	case specv1.MessageDesire, specv1.MessageDeviceDesire, specv1.MessageMultipleDeviceDesire:
		data, err = l.post(l.cfg.HTTPLink.DesireURL, pld, msg.Metadata)
		if err != nil {
			return nil, errors.Trace(err)
		}
	default:
		return nil, errors.Errorf("unsupported message kind")
	}
	data, err = utils.ParseEnv(data)
	if err != nil {
		return nil, errors.Trace(err)
	}
	res.Content.SetJSON(data)
	l.log.Debug("http link receive response", log.Any("message", res))
	return res, nil
}