You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending REST parameters as a JSON object together with a Content-Type: json instead of multipart/form-data, then the device parameter is not handled; i.e., the device is not registered and does not appear in the user account.
Cause
The code directly accesses $_POST['device'] instead of retrieving the request parameter from WP_REST_Request.
The text was updated successfully, but these errors were encountered:
sun
changed the title
Device parameter is not parsed from request body if sent with content-type application/json
Device parameter is not parsed from request body if sent with content-type: json
Mar 9, 2022
sun
changed the title
Device parameter is not parsed from request body if sent with content-type: json
Device parameter is not parsed from request body if sent with 'content-type: json'.
Mar 9, 2022
Discovered during #33
Problem
Content-Type: json
instead ofmultipart/form-data
, then thedevice
parameter is not handled; i.e., the device is not registered and does not appear in the user account.Cause
$_POST['device']
instead of retrieving the request parameter fromWP_REST_Request
.The text was updated successfully, but these errors were encountered: