This function is using ajax. You can put it inside the N3pheleClient class so this code does not stay here in this class. See other functions from N3pheleClient.