Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var camposRequeridos={IDVisita: this.reparto.IDVisita, Expedicion: this.albaranes};
- this.communicate.postRecogida(camposRequeridos);
- export class CommunicateProvider {
- private defaultHeaders = {"Content-Type": "application/json"};
- constructor(public http:HTTP,
- private auth: AuthProvider) {
- this.http.setDataSerializer('json');
- this.albaranes==null;
- this.cliente=null;
- this.reembolsos=0;
- }
- get(URL, params, headers){
- let signedHeaders = this.auth.signRequest(headers);
- return this.http.get(URL, params, signedHeaders);
- }
- post(URL, params, headers){
- let signedHeaders = this.auth.signRequest(headers);
- return this.http.post(URL, params, signedHeaders);
- }
- postRecogida(camposRequeridos){
- return this.http.post(SERVER_URL + '/Recogida', camposRequeridos, this.auth.signRequest(this.defaultHeaders));
- }
- }
- case 'POST':
- {
- parse_str($var, $POST);
- $_POST = array_merge((array)$_POST, (array)$POST);
- break;
- }
- if(isset($_POST['Expedicion'])){
- if(is_string($_POST['Expedicion'])){
- $expediciones = json_decode($_POST['Expedicion'], true);
- }else{
- $expediciones = $_POST['Expedicion'];
- }
- }else{
- $expediciones = array();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement