Skip to content

Commit d34206f

Browse files
authored
Merge pull request #145 from WebFuzzing/http-patch-spring-starter
http-patch-spring starter
2 parents ae1a593 + cf0e269 commit d34206f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2682
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Cassio Molin
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

jdk_11_maven/cs/rest/http-patch-spring/README.md

Lines changed: 648 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<mxfile modified="2019-06-09T20:41:31.631Z" host="www.draw.io" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36" etag="bjO4K4S22PicHpYB_BMI" version="10.7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Kx6lbIDp5FIItFPRwtOSxRwebrUB1YXGVHBHZ2lf70nAJcuepWVcpR4WOmWJjjt8Uhp/cu5gWYLecVmPeLX1lh3aqAQq876vdrWXD4hy/tdbpe+Q2hU31D6Dk1dLBP9o8OLnQ4Gx16HbdpdKj7CHWhwwF04EwgQZjK0wPvQw/X7Zbo4ZyQHrKZn4CmvsJJM7z+Cw==</diagram></mxfile>
106 KB
Loading
Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
{
2+
"info": {
3+
"_postman_id": "f5bfd14e-56b1-4af7-8b95-571b05cc130e",
4+
"name": "Patching",
5+
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6+
},
7+
"item": [
8+
{
9+
"name": "Get all contacts",
10+
"request": {
11+
"method": "GET",
12+
"header": [
13+
{
14+
"key": "Accept",
15+
"value": "application/json",
16+
"type": "text"
17+
}
18+
],
19+
"body": {
20+
"mode": "raw",
21+
"raw": ""
22+
},
23+
"url": {
24+
"raw": "{{base-url}}/contacts",
25+
"host": [
26+
"{{base-url}}"
27+
],
28+
"path": [
29+
"contacts"
30+
]
31+
}
32+
},
33+
"response": []
34+
},
35+
{
36+
"name": "Get a contact by id",
37+
"request": {
38+
"method": "GET",
39+
"header": [
40+
{
41+
"key": "Accept",
42+
"type": "text",
43+
"value": "application/json"
44+
}
45+
],
46+
"body": {
47+
"mode": "raw",
48+
"raw": ""
49+
},
50+
"url": {
51+
"raw": "{{base-url}}/contacts/{{contact-id}}",
52+
"host": [
53+
"{{base-url}}"
54+
],
55+
"path": [
56+
"contacts",
57+
"{{contact-id}}"
58+
]
59+
}
60+
},
61+
"response": []
62+
},
63+
{
64+
"name": "Create a contact",
65+
"event": [
66+
{
67+
"listen": "test",
68+
"script": {
69+
"id": "f3c84134-a4af-46a0-9e4d-4ffd828f837e",
70+
"exec": [
71+
"if (responseCode.code === 201) {",
72+
" let location = postman.getResponseHeader(\"Location\");",
73+
" let id = location.substring(location.lastIndexOf('/') + 1);",
74+
" postman.setEnvironmentVariable(\"contact-id\", id);",
75+
"} else {",
76+
" postman.clearEnvironmentVariable(\"contact-id\");",
77+
"}"
78+
],
79+
"type": "text/javascript"
80+
}
81+
}
82+
],
83+
"request": {
84+
"method": "POST",
85+
"header": [
86+
{
87+
"key": "Content-Type",
88+
"value": "application/json",
89+
"type": "text"
90+
}
91+
],
92+
"body": {
93+
"mode": "raw",
94+
"raw": "{\n \"name\": \"John Appleseed\"\n}"
95+
},
96+
"url": {
97+
"raw": "{{base-url}}/contacts",
98+
"host": [
99+
"{{base-url}}"
100+
],
101+
"path": [
102+
"contacts"
103+
]
104+
}
105+
},
106+
"response": []
107+
},
108+
{
109+
"name": "Update a contact",
110+
"event": [
111+
{
112+
"listen": "test",
113+
"script": {
114+
"id": "f3c84134-a4af-46a0-9e4d-4ffd828f837e",
115+
"exec": [
116+
""
117+
],
118+
"type": "text/javascript"
119+
}
120+
}
121+
],
122+
"request": {
123+
"method": "PUT",
124+
"header": [
125+
{
126+
"key": "Content-Type",
127+
"type": "text",
128+
"value": "application/json"
129+
}
130+
],
131+
"body": {
132+
"mode": "raw",
133+
"raw": "{\n \"name\": \"John Appleseed\",\n \"work\": {\n \"title\": \"Engineer\",\n \"company\": \"ACME\"\n }\n}"
134+
},
135+
"url": {
136+
"raw": "{{base-url}}/contacts/{{contact-id}}",
137+
"host": [
138+
"{{base-url}}"
139+
],
140+
"path": [
141+
"contacts",
142+
"{{contact-id}}"
143+
]
144+
}
145+
},
146+
"response": []
147+
},
148+
{
149+
"name": "Update a contact with JSON Patch",
150+
"event": [
151+
{
152+
"listen": "test",
153+
"script": {
154+
"id": "f3c84134-a4af-46a0-9e4d-4ffd828f837e",
155+
"exec": [
156+
""
157+
],
158+
"type": "text/javascript"
159+
}
160+
}
161+
],
162+
"request": {
163+
"method": "PATCH",
164+
"header": [
165+
{
166+
"key": "Content-Type",
167+
"type": "text",
168+
"value": "application/json-patch+json"
169+
}
170+
],
171+
"body": {
172+
"mode": "raw",
173+
"raw": "[\n {\n \"op\": \"replace\", \"path\": \"/name\", \"value\": \"Johnny Appleseed\"\n }\n]"
174+
},
175+
"url": {
176+
"raw": "{{base-url}}/contacts/{{contact-id}}",
177+
"host": [
178+
"{{base-url}}"
179+
],
180+
"path": [
181+
"contacts",
182+
"{{contact-id}}"
183+
]
184+
}
185+
},
186+
"response": []
187+
},
188+
{
189+
"name": "Update a contact with JSON Merge Patch",
190+
"event": [
191+
{
192+
"listen": "test",
193+
"script": {
194+
"id": "f3c84134-a4af-46a0-9e4d-4ffd828f837e",
195+
"exec": [
196+
""
197+
],
198+
"type": "text/javascript"
199+
}
200+
}
201+
],
202+
"request": {
203+
"method": "PATCH",
204+
"header": [
205+
{
206+
"key": "Content-Type",
207+
"type": "text",
208+
"value": "application/merge-patch+json"
209+
}
210+
],
211+
"body": {
212+
"mode": "raw",
213+
"raw": "{\n \"name\": \"Johnny Appleseed\"\n}"
214+
},
215+
"url": {
216+
"raw": "{{base-url}}/contacts/{{contact-id}}",
217+
"host": [
218+
"{{base-url}}"
219+
],
220+
"path": [
221+
"contacts",
222+
"{{contact-id}}"
223+
]
224+
}
225+
},
226+
"response": []
227+
},
228+
{
229+
"name": "Update a contact Copy",
230+
"event": [
231+
{
232+
"listen": "test",
233+
"script": {
234+
"id": "f3c84134-a4af-46a0-9e4d-4ffd828f837e",
235+
"exec": [
236+
"if (responseCode.code === 204) {",
237+
" postman.clearEnvironmentVariable(\"contact-id\");",
238+
"}"
239+
],
240+
"type": "text/javascript"
241+
}
242+
}
243+
],
244+
"request": {
245+
"method": "DELETE",
246+
"header": [],
247+
"body": {
248+
"mode": "raw",
249+
"raw": ""
250+
},
251+
"url": {
252+
"raw": "{{base-url}}/contacts/{{contact-id}}",
253+
"host": [
254+
"{{base-url}}"
255+
],
256+
"path": [
257+
"contacts",
258+
"{{contact-id}}"
259+
]
260+
}
261+
},
262+
"response": []
263+
}
264+
]
265+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"id": "b91d4653-55ed-4024-8acb-d77e18b28c77",
3+
"name": "patching",
4+
"values": [
5+
{
6+
"key": "base-url",
7+
"value": "http://localhost:8080",
8+
"description": {
9+
"content": "",
10+
"type": "text/plain"
11+
},
12+
"enabled": true
13+
}
14+
],
15+
"_postman_variable_scope": "environment",
16+
"_postman_exported_at": "2019-06-10T21:24:49.655Z",
17+
"_postman_exported_using": "Postman/6.7.3"
18+
}

0 commit comments

Comments
 (0)