question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Callback never called when parsing Meteor-http-methods request ?

See original GitHub issue

I’m trying to integrate formidable with Meteor-http-methods but the parse callback isn’t firing.

I suspect this.request isn’t exactly the request formidable is waiting for?

formidable = require('formidable')

HTTP.methods({
  '/myhook': function(data) {
    console.log( "hook called" );
    var form = new formidable.IncomingForm();
    form.parse(this.request, function(error, fields, files) {
      console.log( "parse finished" );
      console.log(arguments);
    });
  }
});

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hemscommented, Feb 11, 2017

@tunnckoCore no need to apologize everybody is entitled to exercise their blue monday

1reaction
hemscommented, Feb 11, 2017

@tunnckoCore is just the first thing that came up on my google search and it worked, what would you recommend? i don’t mind changing for something better, surely it won’t take a long time (( :

Read more comments on GitHub >

github_iconTop Results From Across the Web

Callback never called when parsing Meteor-http-methods ...
I'm trying to integrate formidable with Meteor-http-methods but the parse callback isn't firing. I suspect this.request isn't exactly the ...
Read more >
Methods | Meteor API Docs
When the method is complete (which may or may not happen before Meteor.call returns), the callback will be called with two arguments: error...
Read more >
Dealing with Meteor.Error and .wrapAsync() - best methods?
I came here having the same trouble you were: the error being thrown contains a stack trace and not the original error. It...
Read more >
Handling errors using Meteor methods and HTTP
This works when I use HTTP.post with a callback (async). However, using HTTP.post without a callback (sync) directly inside a Meteor method returns...
Read more >
Integrating External APIs into your Meteor application | Manning
The client application calls a server method called geoJsonforIp (step 2) that makes an (asynchronous) call to the external API using the HTTP.get()...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found