[MM-26463] Keep query parameter for interplugin requests (#14905)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
08457860cc
Коммит
a34ea6ad63
@@ -1381,6 +1381,11 @@ func TestInterpluginPluginHTTP(t *testing.T) {
|
||||
if r.URL.Path != "/api/v2/test" {
|
||||
return
|
||||
}
|
||||
|
||||
if r.URL.Query().Get("abc") != "xyz" {
|
||||
return
|
||||
}
|
||||
|
||||
buf := bytes.Buffer{}
|
||||
buf.ReadFrom(r.Body)
|
||||
resp := "we got:" + buf.String()
|
||||
@@ -1410,7 +1415,7 @@ func TestInterpluginPluginHTTP(t *testing.T) {
|
||||
func (p *MyPlugin) MessageWillBePosted(c *plugin.Context, post *model.Post) (*model.Post, string) {
|
||||
buf := bytes.Buffer{}
|
||||
buf.WriteString("This is the request")
|
||||
req, err := http.NewRequest("GET", "/testplugininterserver/api/v2/test", &buf)
|
||||
req, err := http.NewRequest("GET", "/testplugininterserver/api/v2/test?abc=xyz", &buf)
|
||||
if err != nil {
|
||||
return nil, err.Error()
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user