Send json in urlfetch

Is there possibility of sending POST request with JSON using urlfetch?
Where can I find Nightbot tutorials?

Hiya, currently urlfetch only does GET requests. Through $(eval) you can execute JavaScript code, you might be able to POST there, but the script execution time is only 1 second.

Thank you. I changed my api to respect GET request, so I can use urlfetch.
Just out of curiosity, how to make request in $(eval) using js? I have tried xmlhttprequest and node’s http and both are undefined

Heya! I was thinking about this only, I mean to make POST requests, I want to ask what ...1 second... actually means?

Hey @Ritik_Ranjan!

It means that your code’s execution time must be under 1 second, if it goes beyond that Nightbot will timeout the eval.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.