var url = 'posturl', data = 'parameters',config='contenttype';
$http.post(url, data, config).then(function (response) {
// This function handles success
}, function (response) {
// this function handles error
});
post(url: string,
body: any,
options: {
headers?: HttpHeaders | { [header: string]: string | string[]; };
observe?: "body|events|response|";
params?: HttpParams | { [param: string]: string | string[]; };
reportProgress?: boolean;
responseType: "arraybuffer|json|blob|text";
withCredentials?: boolean;
}
): Observable
const res = {
"status": true,
"data": {
"cServico": {
"Codigo": "04510",
"Valor": "65,00",
"PrazoEntrega": "6",
"ValorSemAdicionais": "65,00",
"ValorMaoPropria": "0,00",
"ValorAvisoRecebimento": "0,00",
"ValorValorDeclarado": "0,00",
"EntregaDomiciliar": "S",
"EntregaSabado": "N",
"obsFim": {},
"Erro": "0",
"MsgErro": {},
},
},
};
console.log(res.data.cServico.Valor);