Skip to content

Commit ed6ea0f

Browse files
committed
Allow non scalar value to be set with setSetting(), use application/json content type.
1 parent 9127340 commit ed6ea0f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/settings/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ export async function getSettings( requestUtils ) {
2929
*/
3030
export async function setSetting( requestUtils, settingKey, settingValue ) {
3131
return requestUtils.rest( {
32+
headers: {
33+
'Content-Type': 'application/json',
34+
},
3235
path: BASE_PATH,
33-
method: 'PUT',
34-
params: {
36+
method: 'POST',
37+
data: {
3538
[ settingKey ]: settingValue,
3639
},
3740
} );

0 commit comments

Comments
 (0)