Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to execute callback? #11

Closed
mopduan opened this issue Apr 9, 2014 · 3 comments
Closed

how to execute callback? #11

mopduan opened this issue Apr 9, 2014 · 3 comments

Comments

@mopduan
Copy link

mopduan commented Apr 9, 2014

how to execute callback function after http request complete?

I have to say, grunt-http document & example is not too much.

@johngeorgewright
Copy link
Owner

There isn't a callback function yet. At the moment, you can just save the response to a file. I assumed that other grunt tasks would then take over at that point.

It's something that could be put in if people think it's necessary.

johngeorgewright added a commit that referenced this issue Apr 9, 2014
johngeorgewright added a commit that referenced this issue Apr 9, 2014
Implemented a callback option. See #11.
@johngeorgewright
Copy link
Owner

There's now an option to act on the response object it's self:

http: {
  some_service: {
    options: {
      url: '/some/url.html'
      callback: function (err, response, body) {}
    }
  }
}

Released as v1.3.0.

@artbindu
Copy link

artbindu commented Aug 18, 2022

Is there any way to handle the grunt-http callback error?

https://stackoverflow.com/questions/73398057/gruntfile-js-handlling-grunt-http-callback-error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants