-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-tests.http
More file actions
36 lines (29 loc) · 993 Bytes
/
Copy pathapi-tests.http
File metadata and controls
36 lines (29 loc) · 993 Bytes
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
### Register a new user
POST http://localhost:7071/api/register
Content-Type: application/json
{
"username": "testuser",
"email": "test@example.com",
"password": "Password123!"
}
### Login with registered user
POST http://127.0.0.1:7071/api/login
Content-Type: application/json
{
"email": "test@example.com",
"password": "Password123!"
}
### Get user balance (Replace TOKEN with your JWT token)
GET http://localhost:4000/api/credits/balance
Authorization: Bearer TOKEN
### Process OCR (Use Multipart form-data for file upload)
# For file uploads, you'll need to use curl or a tool like Postman
# This is a placeholder to show the endpoint
POST http://localhost:4000/api/ocr/process
Authorization: Bearer TOKEN
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="file"; filename="test.jpg"
Content-Type: image/jpeg
< ./test.jpg
------WebKitFormBoundary7MA4YWxkTrZu0gW--