Closed fongandrew closed 9 years ago
That's a bug indeed. I'm currently super swamped with other tasks. If you are able to put together a PR I'd be more than happy to merge. :)
If this looks fine to you, can you publish to atmosphere? Thanks!
Done, sorry for delays! 0.4.2 is published
Inserting a new call into the Calls collection throws an exception if one of the options passed to HTTP.call contains keys that are valid Javascript / JSON-able, but are not valid Mongo document field names.
In my particular case, I'm posting a query to ElasticSearch by calling HTTP.call with options.data set to a JSON-able object with "cards.label" as a key. HttpInterceptor tries to insert the options object as-is into Mongo, which causes Mongo to reject the insertion (because of the "." in the options.data field name).
Relevant piece of code appears to be here: https://github.com/xolvio/meteor-http-interceptor/blob/master/server.js#L143-152
Traceback below: