Face Verification

פרמיום
על ידי PresentID | מְעוּדכָּן 3日前 | Visual Recognition
פּוֹפּוּלָרִיוּת

9.4 / 10

חֶבִיוֹן

2,484ms

רמת שירות

100%

Health Check

N/A

חזרה לכל הדיונים

Using faceverification in Angular

Rapid account: Davebanguilan

Hi,

How can I create a post request and retrieve the data in Angular? I currently have this code in my service where I pass the base64 data of the two images.

httpOptions = {
headers: new HttpHeaders({
‘content-type’: ‘application/x-www-form-urlencoded’,
‘X-RapidAPI-Key’: ‘<MY API KEY HERE>’,
‘X-RapidAPI-Host’: ‘<MY HOST HERE>’,
})
};

constructor(
private http: HttpClient
) {}

submitRequest(data1, data2): Observable<any> {
console.log(data1);
console.log(data2);
return this.http.post<any>
(‘https://face-verification2.p.rapidapi.com/faceverification’,
{ image1Base64: data1, image2Base64: data2 }, { headers: this.httpOptions.headers});
}

I keep on getting the error 400 and the error title says One or more validation errors occurred. . Let me know what am I missing here.

Thanks
Rapid account: Present ID
PresentID Commented 1年前

Hello, please send us the sample file you are using. Because generally, this error occurs due to a problem in the file or upload.
presentid.co@gmail.com

Rapid account: Davebanguilan
davebanguilan Commented 2年前

It also has this error message Failed to read the request form. Form key length limit 2048 exceeded.

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות