DEV Community

Nagarajan R
Nagarajan R

Posted on

Answer: Post request via Chai

The way you have written, I assume that you used chai-http package. The .field() function does not work in chai-http. Another user pointed it out here and opened an issue on github.

Here is how you could have written:

.set('content-type', 'application/x-www-form-urlencoded')
.send({myparam: 'test'})

Here is the full code…

Top comments (0)