federicotdn / verb

Organize and send HTTP requests from Emacs
https://melpa.org/#/verb
GNU General Public License v3.0
546 stars 20 forks source link

After package update several requests throw error instead of returning response #15

Closed ruderngespra closed 4 years ago

ruderngespra commented 4 years ago

Thank you for your work on this really helpful mode!

I used to use it a lot, but after a package update I am no longer able to receive responses from some requests to the contentful apis that work fine with every other tool (e.g. curl, the browser or postman). Instead, I get the following error message: error in process filter: Wrong type argument: sequencep, fundamental-mode

The content-type header returned by the response is: application/vnd.contentful.management.v1+json

If needed, I can provide more information.

federicotdn commented 4 years ago

Hey @ruderngespra! Thanks for reporting this. The problem was with the way I was handling responses with unknown content types. I have pushed a fix to master, please check if it works for you when MELPA picks it up on the next build.

Note: the content type application/vnd.contentful.management.v1+json will be handled using Fundamental mode by default, because it does not match the regexp application/json. You can change this by customizing your verb-content-type-handlers variable, by changing ("application/json" verb--handler-json) to ("application/.*?json" verb--handler-json).

ruderngespra commented 4 years ago

Hello @federicotdn, and thank you so much for your quick response! Your fix seems to work perfectly! Thank you for your work!