make post data directly accessible, start moving more things to foundation instead of C api