apache / apisix-go-plugin-runner

Go Plugin Runner for APISIX
https://apisix.apache.org/
Apache License 2.0
167 stars 69 forks source link

request help: support get cookies method in request interface #140

Open ZhangShangyu opened 10 months ago

ZhangShangyu commented 10 months ago

Issue description

In our plugin implementation we need get cookies from request, we can get cookie from header by

request.Header().Values("Cookie")

after that we need to parse the string to cookie structure, however it is not convenient and effective when we have many plugins have to use cookie.

So how about consider to add and implement cookie method in Request interface? like net/http/request.go

Cookies(filter string) []*Cookie 

Environment