Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49235

Secured connection between app and server

$
0
0

@itosoft wrote:

hi i try these code to connect my ionic app to apiserver (get)

    import { Injectable } from '@angular/core';
    import { HttpClient } from '@angular/common/http';
    import { Observable } from 'rxjs';
    import { map } from 'rxjs/operators';
     
    @Injectable({
      providedIn: 'root'
    })
    export class EncryptionService {
    
      url = 'https://api.am....com';
       api-key='......'

      constructor(private http: HttpClient) { }
     
        newcheck(checkid: string ,cost: string,toname: string,tocode: string,passcode: string,date: string,checkfor: string,back: string): {
        return this.http.get(`${this.url}?key=${this.api-key}&checkid=${encodeURI(checkid)}&cost=${encodeURI(cost)}&toname=${encodeURI(toname)}&tocode=${encodeURI(tocode)}&passcode=${encodeURI(passcode)}&date=${encodeURI(date)}&checkfor=${encodeURI(checkfor)}&back=${encodeURI(back)}`);
    }
    
   
    }

my API has API key and get data in URL

how can i perform these in the secured way?

for example to prevent someone to listen and monitor transferred data between app and server?
or prevent someone to distract and fake received data by app?

or anything to make this connection secured

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49235

Trending Articles