Framework7 Ajax Post

I have a problem getting Ajax to work with Framework7, below is what I have when using javascript, understandably there are some changes in V2 and ive looked at myApp.request.postJSON - but I just get error messages , below is the original that im trying to convert - thanks in advance.

$.ajax({
type: “POST”,
url: localStorage.remoteURL,
dataType: “json”,
data: { fname: Rfname, lname: Rlname, email: Remail },
success:function(data)
{

          if(data.status == 'success'){
           alert(("A registration link has been sent to your email address"));
	window.location.replace("login.html");
	return;

          }
           else  if(data.status == 'T'){
	  alert(("That email address has already been registered, please login."));
	window.location.replace("login.html");
	return;

           }
            
      }
      ,
      
      fail: function(data)
      {
          
            alert("Registration failed");
	return;
      }
     
 , error:function(x,e) {
alert("Error");
}

}
      );

Replace $.ajax( to app.request(

i then get app.request is undefined, even though I declare:
var app = new Framework7();

Then you are doing something wrong which is impossible to say without seeing examples. Start from some of the ready v2 templates http://framework7.io/templates/

Could it be that the JSON function is not defined. Because on my case,

using the V2 version, i get that app.request.postJSON is not a function error in the console?