Open paulrobertlloyd opened 2 months ago
Fixing this for the next beta. I had it on my list from a long time ago and somehow it never made it into a release.
I'm testing this more and discovered that the Micro.blog app does not actually send as JSON. It's sending a content-type of "application/x-www-form-urlencoded" but actually the data looks like it's "multipart/form-data", which seems wrong. So maybe that's where the problem is? Anyway, it's definitely not JSON, I've confirmed this by logging the raw HTTP request.
Oh wait, this is a duplicate of #53. 🤦 I should have checked that I hadn’t already filled this issue. Any chance of this getting fixed in an upcoming release? The iOS app is now sooooo close to be the perfect iOS app for posting to a third-party Micropub server!
In creating a post with 2 categories and 1 syndication target, using
category
andmp-syndicate-to
which accept arrays, I see the following in thePOST
request:Note the array property keys include
[]
, when they should not.If I’m understanding this right, this might be confusing how
application/json
body is sent versus how the same information is sent usingapplication/x-www-form-urlencoded
.An array should be provided in JSON as follows:
Only when form encoding arrays do multiple values get appended with
[]
, meaning the above would be represented as:This is as documented in the Micropub spec.