We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is a little test suite i use to test a simple API:
var APIeasy = require('api-easy'); var suite = APIeasy.describe('API'); suite.use('localhost', 3000) .path('/users') .get() .expect(200) .next() .put({ firstName: 'Testibus', lastName: 'Testman' }) .expect(200) .export(module)
However, the .get() works as expected but the .put() results in an error:
.get()
.put()
A PUT to /users ✗ should respond with 200 » expected 200, got undefined (==) // api-easy.js:290 ✗ Broken » 1 honored ∙ 1 broken (0.304s)
Am i missing something?
The text was updated successfully, but these errors were encountered:
This comment is pretty old... but came across the same issue. Explicitly setting Content-Type in header resolved it. For example:
suite.use('localhost', 3000) .path('/users') .setHeader('Content-Type', 'application/x-www-form-urlencoded') .put({ firstName: 'Testibus', lastName: 'Testman' }) .expect(200)
Sorry, something went wrong.
No branches or pull requests
This is a little test suite i use to test a simple API:
However, the
.get()
works as expected but the.put()
results in an error:Am i missing something?
The text was updated successfully, but these errors were encountered: