scastillo / siesta

Sit back, relax and enjoy your REST client for python
scastillo.github.com/siesta
98 stars 19 forks source link

Handle Content-Type "application/hal+json" #14

Open armSeb opened 7 years ago

armSeb commented 7 years ago

Hi,

By default the library handles only the "application/json" content-type. This causes the parser not working with several APIs which uses hal:

http://stateless.co/hal_specification.html

In my case, I just modified the init.py file:

if mime == 'application/json':

became:

if mime == 'application/json' or mime == 'application/hal+json':

Can you add the application/hal+json mine type ?

Thank you.