Create a Node.js function for an HTTP POST request for a Swagger API

Will Button
InstructorWill Button

Share this video with your friends

Send Tweet

This lesson shows you how to create the functions defined in the Todo API specification to create new Todo items when received in HTTP POST methods. You will also see the errors you will get when CORS is not properly configured and how to resolve them by installing the NPM CORS package.

Rodney Hartzell
Rodney Hartzell
~ 2 years ago

Sheesh. I was getting an error that took me some time to figure out. I was having trouble letting swagger read parameters from the url. This StackOverflow post saved my bacon. https://stackoverflow.com/questions/34306720/swagger-with-custom-configuration-not-loading-params