You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been searching around on this issue and haven't found a good answer. I hope I'm not doing something silly.
I have a simple program that periodically generates a block of text data and I need to pass that data to a meteor application and parse the weird text format there.
I'm using curl to send the data to my meteor server; something like: curl -d 'foo\nbar' -H 'Content-Type: text/plain' https://myserver/api/test. The problem is that in the request handler, this.bodyParams is always an empty object.
If other content types are used, restivus tries to parse the data but this doesn't always capture every byte. Notably, if Content-Type header is removed, curl defaults to application/x-www-form-urlencoded which is reversible for the simple example I provided, but not for other more complicated use cases.
I just noticed #108. Unfortunately the this.request._readableState.buffer.toString() method seems to not work for me. I'm running node v8.5.0. I've seen discussions around changing _readableState as it's supposed to be private. Maybe behavior has changed?
Hello,
I've been searching around on this issue and haven't found a good answer. I hope I'm not doing something silly.
I have a simple program that periodically generates a block of text data and I need to pass that data to a meteor application and parse the weird text format there.
I'm using curl to send the data to my meteor server; something like:
curl -d 'foo\nbar' -H 'Content-Type: text/plain' https://myserver/api/test
. The problem is that in the request handler,this.bodyParams
is always an empty object.If other content types are used, restivus tries to parse the data but this doesn't always capture every byte. Notably, if
Content-Type
header is removed, curl defaults toapplication/x-www-form-urlencoded
which is reversible for the simple example I provided, but not for other more complicated use cases.Now, it is possible to get at the raw data with something like this: https://stackoverflow.com/questions/35857250/how-can-i-get-post-raw-body-in-meteor-restivus but that sure seems like a convoluted way to get the raw POST data. This is also not possible in my use case as the meteor app that I'm using doesn't expose the raw
request
object from restivus.Would it be possible and make sense to add a
text/plain
parser?The text was updated successfully, but these errors were encountered: