-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_main.http
More file actions
78 lines (55 loc) · 2.4 KB
/
test_main.http
File metadata and controls
78 lines (55 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Test your FastAPI endpoints
# Root endpoint
GET http://127.0.0.1:8000/
Accept: application/json
###
# Hello endpoint
GET http://127.0.0.1:8000/hello/User
Accept: application/json
###
# Analyze PDF endpoint
POST http://127.0.0.1:8000/api/pdf/analyze
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="pdf_file"; filename="test.pdf"
Content-Type: application/pdf
< ./examplecode/5355531_8352950/5355531_8352950.PDF
------WebKitFormBoundary7MA4YWxkTrZu0gW--
###
# Process PDF with circle shape
POST http://127.0.0.1:8000/api/pdf/process
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="pdf_file"; filename="test.pdf"
Content-Type: application/pdf
< ./examplecode/5355531_8352950/5355531_8352950.PDF
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="job_config"
{"reference": "5355531-8352950", "shape": "circle", "width": 50, "height": 50, "radius": 0, "spot_color_name": "stans", "line_thickness": 0.5}
------WebKitFormBoundary7MA4YWxkTrZu0gW--
###
# Process PDF with rectangle shape
POST http://127.0.0.1:8000/api/pdf/process
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="pdf_file"; filename="test.pdf"
Content-Type: application/pdf
< ./examplecode/5355794_8353428/5355794_8353428.PDF
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="job_config"
{"reference": "5355794-8353428", "shape": "rectangle", "width": 40, "height": 140, "radius": 2, "spot_color_name": "stans", "line_thickness": 0.5}
------WebKitFormBoundary7MA4YWxkTrZu0gW--
###
# Process PDF with JSON file
POST http://127.0.0.1:8000/api/pdf/process-with-json-file
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="pdf_file"; filename="test.pdf"
Content-Type: application/pdf
< ./examplecode/5355531_8352950/5355531_8352950.PDF
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="json_file"; filename="config.json"
Content-Type: application/json
< ./examplecode/5355531_8352950/5355531_8352950.json
------WebKitFormBoundary7MA4YWxkTrZu0gW--
###