lib/middleware/forms.js
function _createRequestParams(params){
  var resourcePath = params.resourcePath;

  resourcePath = resourcePath.replace(":domain", params.domain)
    .replace(":projectid", params.projectid)
    .replace(":guid", params.appid);

  log.logger.debug("Creating Request Params For Core ", params);
  var coreHost = params.appMbaasModel.coreHost;
  if(coreHost.indexOf("http") !== 0){
    // We do not know protocol so using https as default one.
    coreHost = "https://" + coreHost;
  }
  return {
    url: url.format(coreHost + resourcePath),
    method: params.method,
    headers: {
      'x-fh-auth-app' : params.apiKey
    },
    json: true,
    body: params.data || {}
  };
}
function _createRequestParams(params){
  var resourcePath = params.resourcePath;

  resourcePath = resourcePath.replace(":domain", params.domain)
    .replace(":projectid", params.projectid)
    .replace(":guid", params.appid);

  log.logger.debug("Creating Request Params For Core ", params);
  var coreHost = params.appMbaasModel.coreHost;
  if(coreHost.indexOf("http") !== 0){
    // We do not know protocol so using https as default one.
    coreHost = "https://" + coreHost;
  }
  return {
    url: url.format(coreHost + resourcePath),
    method: params.method,
    headers: {
      'x-fh-auth-app' : params.apiKey
    },
    json: true,
    body: params.data || {}
  };
}
function _createRequestParams ( params ) { var resourcePath = params . resourcePath ; resourcePath = resourcePath . replace ( ":domain" , params . domain ) . replace ( ":projectid" , params . projectid ) . replace ( ":guid" , params . appid ) ; log . logger . debug ( "Creating Request Params For Core " , params ) ; var coreHost = params . appMbaasModel . coreHost ; if ( coreHost . indexOf ( "http" ) !== 0 ) { // We do not know protocol so using https as default one. coreHost = "https://" + coreHost ; } return { url : url . format ( coreHost + resourcePath ) , method : params . method , headers : { 'x-fh-auth-app' : params . apiKey } , json : true , body : params . data || { } } ; }
Creating A Request To Supercore. Supercore will authenticate the app request.
Creating A Request To Supercore . Supercore will authenticate the app request .