🚧 This instance is under construction; expect occasional downtime. Runners available in /repos. Questions? Ask in #wikimedia-gitlab on libera.chat, or under GitLab on Phabricator.

Commit ddd485d5 authored by Samwilson's avatar Samwilson
Browse files

Fix request query string, to support multiple types

parent 00e702b0
......@@ -55,11 +55,11 @@ class Hooks {
$baseUrl = MediaWikiServices::getInstance()->getMainConfig()->get( 'DiagramsServiceUrl' );
$url = trim( $baseUrl, '/' ) . '/render';
$params = [
'postData' => [
'postData' => http_build_query( [
'generator' => $generator,
'types' => json_encode( array_filter( [ 'png', $type ] ) ),
'types' => array_filter( [ 'png', $type ] ),
'source' => $input,
],
] ),
];
$result = Http::request( 'POST', $url, $params, __METHOD__ );
if ( $result === false ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment