serId: 1 }).toJson()
        .then(data => {
          console.log('POST:', data);
          resultDiv.textContent = 'POST: ' + JSON.stringify(data);
        })
        .catch(error => {
          console.error('POST Error:', error);
          resultDiv.textContent = 'POST Error: ' + error;
        });
    });

    document.getElementById('put').addEventListener('click', () => {
      http.put('https://api.camijs.com/posts/1', { id: 1, title: 'foo', body: 'bar', userId: 1 }).toJson()
        .then(data => {