how to call web api from c code