Hello,
Currently porting an app to roda, among other things, it ingests webhooks from shopify. Having an issue about body encoding, completely unable to understand where and how it could be solved
So far with our previous sinatra snippet :
...
request.body.rewind
data = request.body.read
...
data was encoded in ascii-8-bit
As below :
"{\"...as a single left breast pocket and rounded buttoned cuffs.\\u003cbr\\u003e\\u003cbr\\u003eDetails: \\u0
In the roda app, it's plain utf-8
"{\"...st pocket and rounded buttoned cuffs.<br><br>Details: <br>Shell buttons...
As we've have to compare signatures though the body params; we're stuck
We're using the following plugins :
plugin :head
plugin :hooks
plugin :json_parser
plugin :multi_route
plugin :status_handler
plugin :slash_path_empty
plugin :all_verbs
plugin :halt
plugin :request_headers
plugin :default_headers
I tried removing json_parser, with no success;
I'm might obviously lack of understanding about all encoding issues, but is there something to do to preserve the 'default' encoding we could have had witnessed in the original example ?
Hello,
Currently porting an app to roda, among other things, it ingests webhooks from shopify. Having an issue about body encoding, completely unable to understand where and how it could be solved
So far with our previous sinatra snippet :
...
request.body.rewind
data = request.body.read
...
data was encoded in ascii-8-bit
As below :
"{\"...as a single left breast pocket and rounded buttoned cuffs.\\u003cbr\\u003e\\u003cbr\\u003eDetails: \\u0
In the roda app, it's plain utf-8
"{\"...st pocket and rounded buttoned cuffs.<br><br>Details: <br>Shell buttons...
Either encode it to ascii or set your LANG env.
http://ruby-doc.org/core-2.1.2/Encoding.html#class-Encoding-label-External+encoding