Java Creating Rest Api Using Php Variable In Javascript