bakery: do not use undefined methods

This is a fixed version of PR #24 (Followup fix for PR #22)
with the httpjson regressions altered.

Submitted independently so that trunk is not
broken.