bug fix

correct the method used for if its’ a json api request