What is the API call that iPhone makes to check if a number has iMessage enabled
When checking whether a recipient is on iMessage or SMS, iOS does not use http protocol. 

You can use Wireshark on PC or tcpdump on Mac to sniff the entire tcp protocol.