I have an App in which I make requests like the one you see in the following code:
import { Injectable } from '@angular/core';
import { Http, Headers } from '@angular/http';
import 'rxjs/add/operator/map';
@Injectable()
export class ResourcesApiProvider {
public direccion = my_url_app;
constructor(public http: Http) {
}
getCars(car_id) {
let repos = this.http.get(this.direccion + 'api/cars.json' + '?car_id=');
return repos;
}
}
The API I have responds both via HTTP and HTTPS for now, but I want to change all the communication to HTTPS, so I was wondering... what I can do so that Angular / Ionic the app sends encrypted requests to the API?, is it enough to just use the HTTPS URL of my API when I do the assignment public direccion = my_url_app
?
I'm asking because some answers from here say that I have to add /
at the end, but I'm not sure if that's still the case, etc.
Greetings.