title: Run Functional Tests on an API Response using Chai-HTTP III - PUT method
challengeType: 2
---
## Description
<sectionid='description'>
As a reminder, this project is being built upon the following starter project on <ahref='https://glitch.com/#!/import/github/freeCodeCamp/boilerplate-mochachai/'>Glitch</a>, or cloned from <ahref='https://github.com/freeCodeCamp/boilerplate-mochachai/'>GitHub</a>.
In the next example we'll see how to send data in a request payload (body).
We are going to test a PUT request. The '/travellers' endpoint accepts
a JSON object taking the structure :
{surname: [last name of a traveller of the past]} ,
The route responds with :
{name: [first name], surname:[last name], dates: [birth - death years]}
see the server code for more details.
Send {surname: 'Colombo'}. Replace assert.fail() and make the test pass.
Check for 1) status, 2) type, 3) body.name, 4) body.surname