-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequest.http
44 lines (34 loc) · 1.03 KB
/
request.http
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
@host = http://localhost:4004
### Service
### Reading sensitive data (creditCardNo) by default - NOT recommended!
GET {{host}}/odata/v4/processor/Customers
Authorization: Basic alice:wonderland
### Recommendation: Avoid reading sensitive data by explicitly selecting the fields you need
GET {{host}}/odata/v4/processor/Customers?$select=name
Authorization: Basic alice:wonderland
### AdminService
### Creating a customer with personal data
# @name create_customer
POST {{host}}/odata/v4/admin/Customers
Authorization: Basic alice:wonderland
Content-Type: application/json
{
"ID": "{{$guid}}",
"firstName": "Bob",
"lastName": "Builder",
"email": "[email protected]"
}
### Updating a customer with personal data details
@customer = {{create_customer.response.body.ID}}
PATCH {{host}}/odata/v4/admin/Customers('{{customer}}')
Authorization: Basic alice:wonderland
Content-Type: application/json
{
"addresses": [
{
"city": "Walldorf",
"postCode": "69190",
"streetAddress": "Dietmar-Hopp-Allee 16"
}
]
}