-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhttpbin.yaml
1119 lines (1119 loc) · 27.2 KB
/
httpbin.yaml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
servers:
- url: https://httpbin.org
info:
contact:
email: [email protected]
url: https://kennethreitz.org
x-responsibleDeveloper: Kenneth Reitz
x-responsibleOrganization: Kenneth Reitz
description: "A simple HTTP Request & Response Service.<br/> <br/> <b>Run locally: </b> <code>$ docker run -p 80:80 kennethreitz/httpbin</code>"
title: httpbin.org
version: 0.9.2
x-apisguru-categories:
- developer_tools
x-origin:
- format: swagger
url: http://httpbin.org/spec.json
version: "2.0"
x-providerName: httpbin.org
tags:
- description: Testing different HTTP verbs
name: HTTP Methods
- description: Auth methods
name: Auth
- description: Generates responses with given status code
name: Status codes
- description: Inspect the request data
name: Request inspection
- description: Inspect the response data like caching and headers
name: Response inspection
- description: Returns responses in different data formats
name: Response formats
- description: Generates random and dynamic data
name: Dynamic data
- description: Creates, reads and deletes Cookies
name: Cookies
- description: Returns different image formats
name: Images
- description: Returns different redirect responses
name: Redirects
- description: Returns anything that is passed to request
name: Anything
paths:
"/absolute-redirect/{n}":
get:
parameters:
- in: path
name: n
required: true
schema:
type: integer
responses:
"302":
description: A redirection.
summary: Absolutely 302 Redirects n times.
tags:
- Redirects
/anything:
delete:
responses:
"200":
description: Anything passed in request
summary: Returns anything passed in request data.
tags:
- Anything
get:
responses:
"200":
description: Anything passed in request
summary: Returns anything passed in request data.
tags:
- Anything
patch:
responses:
"200":
description: Anything passed in request
summary: Returns anything passed in request data.
tags:
- Anything
post:
responses:
"200":
description: Anything passed in request
summary: Returns anything passed in request data.
tags:
- Anything
put:
responses:
"200":
description: Anything passed in request
summary: Returns anything passed in request data.
tags:
- Anything
trace:
responses:
"200":
description: Anything passed in request
summary: Returns anything passed in request data.
tags:
- Anything
"/anything/{anything}":
delete:
parameters:
- description: Automatically added
in: path
name: anything
required: true
schema:
type: string
responses:
"200":
description: Anything passed in request
summary: Returns anything passed in request data.
tags:
- Anything
get:
parameters:
- description: Automatically added
in: path
name: anything
required: true
schema:
type: string
responses:
"200":
description: Anything passed in request
summary: Returns anything passed in request data.
tags:
- Anything
patch:
parameters:
- description: Automatically added
in: path
name: anything
required: true
schema:
type: string
responses:
"200":
description: Anything passed in request
summary: Returns anything passed in request data.
tags:
- Anything
post:
parameters:
- description: Automatically added
in: path
name: anything
required: true
schema:
type: string
responses:
"200":
description: Anything passed in request
summary: Returns anything passed in request data.
tags:
- Anything
put:
parameters:
- description: Automatically added
in: path
name: anything
required: true
schema:
type: string
responses:
"200":
description: Anything passed in request
summary: Returns anything passed in request data.
tags:
- Anything
trace:
parameters:
- description: Automatically added
in: path
name: anything
required: true
schema:
type: string
responses:
"200":
description: Anything passed in request
summary: Returns anything passed in request data.
tags:
- Anything
"/base64/{value}":
get:
parameters:
- in: path
name: value
required: true
schema:
default: SFRUUEJJTiBpcyBhd2Vzb21l
type: string
responses:
"200":
description: Decoded base64 content.
summary: Decodes base64url-encoded string.
tags:
- Dynamic data
"/basic-auth/{user}/{passwd}":
get:
parameters:
- in: path
name: user
required: true
schema:
type: string
- in: path
name: passwd
required: true
schema:
type: string
responses:
"200":
description: Sucessful authentication.
"401":
description: Unsuccessful authentication.
summary: Prompts the user for authorization using HTTP Basic Auth.
tags:
- Auth
/bearer:
get:
parameters:
- in: header
name: Authorization
schema:
type: string
responses:
"200":
description: Sucessful authentication.
"401":
description: Unsuccessful authentication.
summary: Prompts the user for authorization using bearer authentication.
tags:
- Auth
/brotli:
get:
responses:
"200":
description: Brotli-encoded data.
summary: Returns Brotli-encoded data.
tags:
- Response formats
"/bytes/{n}":
get:
parameters:
- in: path
name: n
required: true
schema:
type: integer
responses:
"200":
description: Bytes.
summary: Returns n random bytes generated with given seed
tags:
- Dynamic data
/cache:
get:
parameters:
- in: header
name: If-Modified-Since
schema:
type: string
- in: header
name: If-None-Match
schema:
type: string
responses:
"200":
description: Cached response
"304":
description: Modified
summary: Returns a 304 if an If-Modified-Since header or If-None-Match is present. Returns the same as a GET otherwise.
tags:
- Response inspection
"/cache/{value}":
get:
parameters:
- in: path
name: value
required: true
schema:
type: integer
responses:
"200":
description: Cache control set
summary: Sets a Cache-Control header for n seconds.
tags:
- Response inspection
/cookies:
get:
responses:
"200":
description: Set cookies.
summary: Returns cookie data.
tags:
- Cookies
/cookies/delete:
get:
parameters:
- allowEmptyValue: true
explode: true
in: query
name: freeform
schema:
additionalProperties:
type: string
type: string
style: form
responses:
"200":
description: Redirect to cookie list
summary: Deletes cookie(s) as provided by the query string and redirects to cookie list.
tags:
- Cookies
/cookies/set:
get:
parameters:
- allowEmptyValue: true
explode: true
in: query
name: freeform
schema:
additionalProperties:
type: string
type: string
style: form
responses:
"200":
description: Redirect to cookie list
summary: Sets cookie(s) as provided by the query string and redirects to cookie list.
tags:
- Cookies
"/cookies/set/{name}/{value}":
get:
parameters:
- in: path
name: name
required: true
schema:
type: string
- in: path
name: value
required: true
schema:
type: string
responses:
"200":
description: Set cookies and redirects to cookie list.
summary: Sets a cookie and redirects to cookie list.
tags:
- Cookies
/deflate:
get:
responses:
"200":
description: Defalte-encoded data.
summary: Returns Deflate-encoded data.
tags:
- Response formats
"/delay/{delay}":
delete:
parameters:
- in: path
name: delay
required: true
schema:
type: integer
responses:
"200":
description: A delayed response.
summary: Returns a delayed response (max of 10 seconds).
tags:
- Dynamic data
get:
parameters:
- in: path
name: delay
required: true
schema:
type: integer
responses:
"200":
description: A delayed response.
summary: Returns a delayed response (max of 10 seconds).
tags:
- Dynamic data
patch:
parameters:
- in: path
name: delay
required: true
schema:
type: integer
responses:
"200":
description: A delayed response.
summary: Returns a delayed response (max of 10 seconds).
tags:
- Dynamic data
post:
parameters:
- in: path
name: delay
required: true
schema:
type: integer
responses:
"200":
description: A delayed response.
summary: Returns a delayed response (max of 10 seconds).
tags:
- Dynamic data
put:
parameters:
- in: path
name: delay
required: true
schema:
type: integer
responses:
"200":
description: A delayed response.
summary: Returns a delayed response (max of 10 seconds).
tags:
- Dynamic data
trace:
parameters:
- in: path
name: delay
required: true
schema:
type: integer
responses:
"200":
description: A delayed response.
summary: Returns a delayed response (max of 10 seconds).
tags:
- Dynamic data
/delete:
delete:
responses:
"200":
description: The request's DELETE parameters.
summary: The request's DELETE parameters.
tags:
- HTTP Methods
/deny:
get:
responses:
"200":
description: Denied message
summary: Returns page denied by robots.txt rules.
tags:
- Response formats
"/digest-auth/{qop}/{user}/{passwd}":
get:
parameters:
- description: auth or auth-int
in: path
name: qop
required: true
schema:
type: string
- in: path
name: user
required: true
schema:
type: string
- in: path
name: passwd
required: true
schema:
type: string
responses:
"200":
description: Sucessful authentication.
"401":
description: Unsuccessful authentication.
summary: Prompts the user for authorization using Digest Auth.
tags:
- Auth
"/digest-auth/{qop}/{user}/{passwd}/{algorithm}":
get:
parameters:
- description: auth or auth-int
in: path
name: qop
required: true
schema:
type: string
- in: path
name: user
required: true
schema:
type: string
- in: path
name: passwd
required: true
schema:
type: string
- description: MD5, SHA-256, SHA-512
in: path
name: algorithm
required: true
schema:
default: MD5
type: string
responses:
"200":
description: Sucessful authentication.
"401":
description: Unsuccessful authentication.
summary: Prompts the user for authorization using Digest Auth + Algorithm.
tags:
- Auth
"/digest-auth/{qop}/{user}/{passwd}/{algorithm}/{stale_after}":
get:
description: |
allow settings the stale_after argument.
parameters:
- description: auth or auth-int
in: path
name: qop
required: true
schema:
type: string
- in: path
name: user
required: true
schema:
type: string
- in: path
name: passwd
required: true
schema:
type: string
- description: MD5, SHA-256, SHA-512
in: path
name: algorithm
required: true
schema:
default: MD5
type: string
- in: path
name: stale_after
required: true
schema:
default: never
type: string
responses:
"200":
description: Sucessful authentication.
"401":
description: Unsuccessful authentication.
summary: Prompts the user for authorization using Digest Auth + Algorithm.
tags:
- Auth
/drip:
get:
parameters:
- description: The amount of time (in seconds) over which to drip each byte
in: query
name: duration
required: false
schema:
default: 2
type: number
- description: The number of bytes to respond with
in: query
name: numbytes
required: false
schema:
default: 10
type: integer
- description: The response code that will be returned
in: query
name: code
required: false
schema:
default: 200
type: integer
- description: The amount of time (in seconds) to delay before responding
in: query
name: delay
required: false
schema:
default: 2
type: number
responses:
"200":
description: A dripped response.
summary: Drips data over a duration after an optional initial delay.
tags:
- Dynamic data
/encoding/utf8:
get:
responses:
"200":
description: Encoded UTF-8 content.
summary: Returns a UTF-8 encoded body.
tags:
- Response formats
"/etag/{etag}":
get:
parameters:
- in: header
name: If-None-Match
schema:
type: string
- in: header
name: If-Match
schema:
type: string
- description: Automatically added
in: path
name: etag
required: true
schema:
type: string
responses:
"200":
description: Normal response
"412":
description: match
summary: Assumes the resource has the given etag and responds to If-None-Match and If-Match headers appropriately.
tags:
- Response inspection
/get:
get:
responses:
"200":
description: The request's query parameters.
summary: The request's query parameters.
tags:
- HTTP Methods
/gzip:
get:
responses:
"200":
description: GZip-encoded data.
summary: Returns GZip-encoded data.
tags:
- Response formats
/headers:
get:
responses:
"200":
description: The request's headers.
summary: Return the incoming request's HTTP headers.
tags:
- Request inspection
"/hidden-basic-auth/{user}/{passwd}":
get:
parameters:
- in: path
name: user
required: true
schema:
type: string
- in: path
name: passwd
required: true
schema:
type: string
responses:
"200":
description: Sucessful authentication.
"404":
description: Unsuccessful authentication.
summary: Prompts the user for authorization using HTTP Basic Auth.
tags:
- Auth
/html:
get:
responses:
"200":
description: An HTML page.
summary: Returns a simple HTML document.
tags:
- Response formats
/image:
get:
responses:
"200":
description: An image.
summary: Returns a simple image of the type suggest by the Accept header.
tags:
- Images
/image/jpeg:
get:
responses:
"200":
description: A JPEG image.
summary: Returns a simple JPEG image.
tags:
- Images
/image/png:
get:
responses:
"200":
description: A PNG image.
summary: Returns a simple PNG image.
tags:
- Images
/image/svg:
get:
responses:
"200":
description: An SVG image.
summary: Returns a simple SVG image.
tags:
- Images
/image/webp:
get:
responses:
"200":
description: A WEBP image.
summary: Returns a simple WEBP image.
tags:
- Images
/ip:
get:
responses:
"200":
description: The Requester's IP Address.
summary: Returns the requester's IP Address.
tags:
- Request inspection
/json:
get:
responses:
"200":
description: An JSON document.
summary: Returns a simple JSON document.
tags:
- Response formats
"/links/{n}/{offset}":
get:
parameters:
- in: path
name: n
required: true
schema:
type: integer
- in: path
name: offset
required: true
schema:
type: integer
responses:
"200":
description: HTML links.
summary: Generate a page containing n links to other pages which do the same.
tags:
- Dynamic data
/patch:
patch:
responses:
"200":
description: The request's PATCH parameters.
summary: The request's PATCH parameters.
tags:
- HTTP Methods
/post:
post:
responses:
"200":
description: The request's POST parameters.
summary: The request's POST parameters.
tags:
- HTTP Methods
/put:
put:
responses:
"200":
description: The request's PUT parameters.
summary: The request's PUT parameters.
tags:
- HTTP Methods
"/range/{numbytes}":
get:
parameters:
- in: path
name: numbytes
required: true
schema:
type: integer
responses:
"200":
description: Bytes.
summary: Streams n random bytes generated with given seed, at given chunk size per packet.
tags:
- Dynamic data
/redirect-to:
delete:
responses:
"302":
description: A redirection.
summary: 302/3XX Redirects to the given URL.
tags:
- Redirects
get:
parameters:
- in: query
name: url
required: true
schema:
type: string
- in: query
name: status_code
schema:
type: integer
responses:
"302":
description: A redirection.
summary: 302/3XX Redirects to the given URL.
tags:
- Redirects
patch:
responses:
"302":
description: A redirection.
summary: 302/3XX Redirects to the given URL.
tags:
- Redirects
post:
requestBody:
$ref: "#/components/requestBodies/postRedirectTo"
responses:
"302":
description: A redirection.
summary: 302/3XX Redirects to the given URL.
tags:
- Redirects
put:
requestBody:
$ref: "#/components/requestBodies/postRedirectTo"
responses:
"302":
description: A redirection.
summary: 302/3XX Redirects to the given URL.
tags:
- Redirects
trace:
responses:
"302":
description: A redirection.
summary: 302/3XX Redirects to the given URL.
tags:
- Redirects
"/redirect/{n}":
get:
parameters:
- in: path
name: n
required: true
schema:
type: integer
responses:
"302":
description: A redirection.
summary: 302 Redirects n times.
tags:
- Redirects
"/relative-redirect/{n}":
get:
parameters:
- in: path
name: n
required: true
schema:
type: integer
responses:
"302":
description: A redirection.
summary: Relatively 302 Redirects n times.
tags:
- Redirects
/response-headers:
get:
parameters:
- allowEmptyValue: true
explode: true
in: query
name: freeform
schema:
additionalProperties:
type: string
type: string
style: form
responses:
"200":
description: Response headers
summary: Returns a set of response headers from the query string.
tags:
- Response inspection
post:
parameters:
- allowEmptyValue: true
explode: true
in: query
name: freeform
schema:
additionalProperties:
type: string
type: string
style: form
responses:
"200":
description: Response headers
summary: Returns a set of response headers from the query string.
tags:
- Response inspection
/robots.txt:
get:
responses:
"200":
description: Robots file
summary: Returns some robots.txt rules.
tags:
- Response formats
"/status/{codes}":
delete:
parameters:
- in: path
name: codes
required: true
schema:
type: string
responses:
"100":
description: Informational responses
"200":
description: Success
"300":
description: Redirection
"400":
description: Client Errors
"500":
description: Server Errors
summary: Return status code or random status code if more than one are given
tags:
- Status codes
get:
parameters:
- in: path
name: codes
required: true
schema:
type: string
responses:
"100":
description: Informational responses
"200":
description: Success
"300":
description: Redirection
"400":
description: Client Errors
"500":
description: Server Errors
summary: Return status code or random status code if more than one are given
tags:
- Status codes
patch:
parameters:
- in: path
name: codes
required: true
schema:
type: string
responses:
"100":
description: Informational responses
"200":
description: Success
"300":
description: Redirection
"400":
description: Client Errors
"500":
description: Server Errors
summary: Return status code or random status code if more than one are given
tags:
- Status codes
post:
parameters:
- in: path
name: codes
required: true
schema:
type: string
responses:
"100":
description: Informational responses
"200":
description: Success