-
Notifications
You must be signed in to change notification settings - Fork 0
/
SampleRequests.http
36 lines (30 loc) · 998 Bytes
/
SampleRequests.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
# Servers
@identityServer = localhost:5001
@storageServer = localhost:7001
# OAuth Properties
@oauthScope = storage
@oauthClientSecret = DemoConfidential
@oauthGrantType = client_credentials
###
# @name session_token
POST https://{{identityServer}}/connect/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
client_id=StorageClient
&scope={{oauthScope}}
&client_secret={{oauthClientSecret}}
&grant_type={{oauthGrantType}}
###
# @name creation
POST https://{{storageServer}}/files HTTP/2.0
Tus-Resumable: 1.0.0
Upload-Length: 62855
Upload-Metadata: filename UHJldmlld0FncmVlbWVudC5wZGY=,filetype YXBwbGljYXRpb24vcGRm
Authorization: Bearer {{session_token.response.body.access_token}}
###
# @name continuation
PATCH https://{{storageServer}}{{creation.response.headers.Location}}
Tus-Resumable: 1.0.0
Upload-Offset: 0
Content-Type: application/offset+octet-stream
Authorization: Bearer {{session_token.response.body.access_token}}
< C:\Users\loligans\Downloads\PreviewAgreement.pdf