通过API接口使用
您可以使用命令行或任意编程语言,通过发送POST请求到API接口来使用图纸识别系统。
您还可以基于 JSON 返回结果进行二次开发,灵活定制,以满足个性化需求。
接口地址
curl -X POST http://api.holdingsky.cn/v1/tuzhi -F '[email protected]'import requests
url = "http://api.holdingsky.cn/v1/tuzhi"
file_path = 'demo1.png'
with open(file_path, 'rb') as file:
files = {'file': file}
response = requests.post(url, files=files)
print(response.json())<!DOCTYPE html>
<html lang="en">
<head></head>
<body>
<input type="file" id="fileInput">
<script>
document.getElementById('fileInput').addEventListener('change', async function() {
const file = this.files[0];
const url = "http://api.holdingsky.cn/v1/tuzhi";
const formData = new FormData();
formData.append('file', file);
const response = await fetch(url, {
method: 'POST',
body: formData
});
const jsonResponse = await response.json();
console.log("Response received:", jsonResponse);
});
</script>
</body>
</html>
接口返回值
最后更新于