Moving postMetricsToServer()

Moving postMetricsToServer() so that its declared before its assigned to
"postFunction"
Merge pull request #1 from niemandr/master

Moving postMetricsToServer()