krausandre / content-blocks-gui

GNU General Public License v2.0
2 stars 0 forks source link

Preserve type information in the AJAX requests #14

Open jonaseberle opened 7 months ago

jonaseberle commented 7 months ago

We need to get bool/int/string/array in PHP to correctly save it as .yaml.

The HTTP transfer is encoded as multipart/form-data (because PHP does not understand JSON natively).

Currently that leads to only string/array.

Idea: We could send a JSON string via multipart/form-data and json_decode() the whole thing once in PHP.

PKuhlmay commented 2 months ago

Couldn't we use application/json instead? With this, we could send booleans directly.