keithjgrant / omnibear

A Micropub browser extension
MIT License
36 stars 8 forks source link

Post using x-www-form-urlencoded #12

Closed keithjgrant closed 6 years ago

keithjgrant commented 7 years ago

Posts are currently made using a multipart/form-data POST. To conform with the micropub specification, this should instead be a x-www-form-urlencoded request.

grantcodes commented 7 years ago

Well I think there really should be a go to micropub npm module that works frontend and backend. Would be very useful for a lot of people and maybe a few others would get involved contributing to it.

keithjgrant commented 7 years ago

That definitely makes sense.

grantcodes commented 7 years ago

Well I made a start https://github.com/terminalpixel/micropub although I don't think it helps with this issue yet.

grantcodes commented 7 years ago

Got to a version 1 of this library now. It passes all the micropub.rocks tests when run server side. On the frontend it's likely to run into CORS issues but hopefully not inside a chrome plugin.

Anyway I could have a go at integrating it if you want?

keithjgrant commented 7 years ago

Have at it :) That would be awesome

cweiske commented 6 years ago

As you see in #31, Omnibear 0.6.0 sends application/x-www-form-urlencoded requests.

keithjgrant commented 6 years ago

@grantcodes This is taken care of now that we’re using micropub-helper correct? Should I close this issue?

grantcodes commented 6 years ago

Yes if you use micropub.create(micropubObject, 'form') then it sends application/x-www-form-urlencoded requests.

The other options are json and multipart if you ever need them