Hi,
When I create a form-data POST request with two images, the Postman Request works.
However when I select the code for Python - Requests the generated code does not work at all.
Itâs looking for the boundary markersâŚ
Is there a way to see the full code that Postman generates that succeeds ?
Thanks,
Brian
import requests
url = âhttps://face-recognition4.p.rapidapi.com/FaceVerificationâ
payload = {}
files = [
(âphoto1â, open(â/C:/Users/bbourgault/Pictures/bb.jpgâ,ârbâ)),
(âphoto2â, open(â/C:/Users/bbourgault/Pictures/bb3.jpgâ,ârbâ))
]
headers = {
âx-rapidapi-hostâ: âface-recognition4.p.rapidapi.comâ,
âx-rapidapi-keyâ: âb810129938msh1eb822ed1a5e36ep108a11jsn92fa2ad1c363â,
âContent-Typeâ: âmultipart/form-dataâ
}
response = requests.request(âPOSTâ, url, headers=headers, data = payload, files = files)
print(response.text.encode(âutf8â))