changes to postToSpace function

The url for android is different than the one for iOS. The below uses an if statement to create the appropriate url depending on the user's mobile os.