Richiesta angolare della posta

Esempi di codice

2
0

richiesta angolare della posta

ngOnInit() {          
     this.http.post<any>('https://reqres.in/invalid-url', { title: 'Angular POST Request Example' }).subscribe({
        next: data => {
            this.postId = data.id;
        },
        error: error => {
            this.errorMessage = error.message;
            console.error('There was an error!', error);
        }
    })
}

...

interface Article {
    id: number;
    title: string;
}
0
0

angularjs fare richiesta post

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

});

Pagine correlate

Pagine di esempio simili

In altre lingue

Questa pagina è in altre lingue

Русский
..................................................................................................................
English
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................