/* * Endpoint household * method POST, post Household instance * * @id integer - id of household * @body Object - dictionary with changes to post */ export const postAddressToHousehold = (householdId, addressId) => { const body = { 'id': addressId }; const url = `/api/1.0/person/household/${householdId}/address.json` return fetch(url, { method: 'POST', headers: {'Content-Type': 'application/json;charset=utf-8'}, body: JSON.stringify(body) }) .then(response => { if (response.ok) { return response.json(); } throw Error('Error with request resource response'); }); };