Pass function name to HttpRequestFactory::create

Change-Id: Ie48127731f0731f780e153f6aacce25961acc3ed
This commit is contained in:
Umherirrender 2024-09-19 22:48:37 +02:00
parent 89a3a1fc57
commit f95c0cc11d

View file

@ -87,7 +87,7 @@ class NotificationServiceClient implements LoggerAwareInterface {
private function constructRequest( string $provider, array $payload ): MWHttpRequest {
$url = "$this->endpointBase/$provider";
$opts = [ 'method' => 'POST', 'postData' => json_encode( $payload ) ];
$req = $this->httpRequestFactory->create( $url, $opts );
$req = $this->httpRequestFactory->create( $url, $opts, __METHOD__ );
$req->setHeader( 'Content-Type', 'application/json; charset=utf-8' );
return $req;
}