-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathResponse.purs
More file actions
698 lines (570 loc) · 20.9 KB
/
Response.purs
File metadata and controls
698 lines (570 loc) · 20.9 KB
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
module HTTPurple.Response
( Response
, send
, response
, response'
, emptyResponse
, emptyResponse'
-- 1xx
, continue
, continue'
, switchingProtocols
, switchingProtocols'
, processing
, processing'
-- 2xx
, ok
, ok'
, created
, created'
, accepted
, accepted'
, nonAuthoritativeInformation
, nonAuthoritativeInformation'
, noContent
, noContent'
, resetContent
, resetContent'
, partialContent
, partialContent'
, multiStatus
, multiStatus'
, alreadyReported
, alreadyReported'
, iMUsed
, iMUsed'
-- 3xx
, multipleChoices
, multipleChoices'
, movedPermanently
, movedPermanently'
, found
, found'
, seeOther
, seeOther'
, notModified
, notModified'
, useProxy
, useProxy'
, temporaryRedirect
, temporaryRedirect'
, permanentRedirect
, permanentRedirect'
-- 4xx
, badRequest
, badRequest'
, unauthorized
, unauthorized'
, paymentRequired
, paymentRequired'
, forbidden
, forbidden'
, notFound
, notFound'
, methodNotAllowed
, methodNotAllowed'
, notAcceptable
, notAcceptable'
, proxyAuthenticationRequired
, proxyAuthenticationRequired'
, requestTimeout
, requestTimeout'
, conflict
, conflict'
, gone
, gone'
, lengthRequired
, lengthRequired'
, preconditionFailed
, preconditionFailed'
, payloadTooLarge
, payloadTooLarge'
, uRITooLong
, uRITooLong'
, unsupportedMediaType
, unsupportedMediaType'
, rangeNotSatisfiable
, rangeNotSatisfiable'
, expectationFailed
, expectationFailed'
, imATeapot
, imATeapot'
, misdirectedRequest
, misdirectedRequest'
, unprocessableEntity
, unprocessableEntity'
, locked
, locked'
, failedDependency
, failedDependency'
, upgradeRequired
, upgradeRequired'
, preconditionRequired
, preconditionRequired'
, tooManyRequests
, tooManyRequests'
, requestHeaderFieldsTooLarge
, requestHeaderFieldsTooLarge'
, unavailableForLegalReasons
, unavailableForLegalReasons'
-- 5xx
, internalServerError
, internalServerError'
, notImplemented
, notImplemented'
, badGateway
, badGateway'
, serviceUnavailable
, serviceUnavailable'
, gatewayTimeout
, gatewayTimeout'
, hTTPVersionNotSupported
, hTTPVersionNotSupported'
, variantAlsoNegotiates
, variantAlsoNegotiates'
, insufficientStorage
, insufficientStorage'
, loopDetected
, loopDetected'
, notExtended
, notExtended'
, networkAuthenticationRequired
, networkAuthenticationRequired'
) where
import Prelude
import Effect.Aff (Aff)
import Effect.Aff.Class (class MonadAff, liftAff)
import Effect.Class (class MonadEffect, liftEffect)
import HTTPurple.Body (class Body, defaultHeaders, write)
import HTTPurple.Headers (ResponseHeaders, empty, toResponseHeaders)
import HTTPurple.Headers (write) as Headers
import HTTPurple.Status (Status)
import HTTPurple.Status (accepted, alreadyReported, badGateway, badRequest, conflict, continue, created, expectationFailed, failedDependency, forbidden, found, gatewayTimeout, gone, hTTPVersionNotSupported, iMUsed, imATeapot, insufficientStorage, internalServerError, lengthRequired, locked, loopDetected, methodNotAllowed, misdirectedRequest, movedPermanently, multiStatus, multipleChoices, networkAuthenticationRequired, noContent, nonAuthoritativeInformation, notAcceptable, notExtended, notFound, notImplemented, notModified, ok, partialContent, payloadTooLarge, paymentRequired, permanentRedirect, preconditionFailed, preconditionRequired, processing, proxyAuthenticationRequired, rangeNotSatisfiable, requestHeaderFieldsTooLarge, requestTimeout, resetContent, seeOther, serviceUnavailable, switchingProtocols, temporaryRedirect, tooManyRequests, uRITooLong, unauthorized, unavailableForLegalReasons, unprocessableEntity, unsupportedMediaType, upgradeRequired, useProxy, variantAlsoNegotiates, write) as Status
import Node.HTTP.Types (ServerResponse)
-- | A `Response` is a status code, headers, and a body.
type Response =
{ status :: Status
, headers :: ResponseHeaders
, writeBody :: ServerResponse -> Aff Unit
}
-- | Given an HTTP `Response` and a HTTPurple `Response`, this method will return
-- | a monad encapsulating writing the HTTPurple `Response` to the HTTP `Response`
-- | and closing the HTTP `Response`.
send :: forall m. MonadEffect m => MonadAff m => ServerResponse -> Response -> m Unit
send httpresponse { status, headers, writeBody } = do
liftEffect $ Status.write httpresponse status
liftEffect $ Headers.write httpresponse headers
liftAff $ writeBody httpresponse
-- | For custom response statuses or providing a body for response codes that
-- | don't typically send one.
response :: forall m b. MonadAff m => Body b => Status -> b -> m Response
response status = response' status empty
-- | The same as `response` but with headers.
response' ::
forall m b.
MonadAff m =>
Body b =>
Status ->
ResponseHeaders ->
b ->
m Response
response' status headers body = liftEffect do
defaultHeaders' <- defaultHeaders body
pure
{ status
, headers: toResponseHeaders defaultHeaders' <> headers
, writeBody: write body
}
-- | The same as `response` but without a body.
emptyResponse :: forall m. MonadAff m => Status -> m Response
emptyResponse status = emptyResponse' status empty
-- | The same as `emptyResponse` but with headers.
emptyResponse' :: forall m. MonadAff m => Status -> ResponseHeaders -> m Response
emptyResponse' status headers = response' status headers ""
---------
-- 1xx --
---------
-- | 100
continue :: forall m. MonadAff m => m Response
continue = continue' empty
-- | 100 with headers
continue' :: forall m. MonadAff m => ResponseHeaders -> m Response
continue' = emptyResponse' Status.continue
-- | 101
switchingProtocols :: forall m. MonadAff m => m Response
switchingProtocols = switchingProtocols' empty
-- | 101 with headers
switchingProtocols' :: forall m. MonadAff m => ResponseHeaders -> m Response
switchingProtocols' = emptyResponse' Status.switchingProtocols
-- | 102
processing :: forall m. MonadAff m => m Response
processing = processing' empty
-- | 102 with headers
processing' :: forall m. MonadAff m => ResponseHeaders -> m Response
processing' = emptyResponse' Status.processing
---------
-- 2xx --
---------
-- | 200
ok :: forall m b. MonadAff m => Body b => b -> m Response
ok = ok' empty
-- | 200 with headers
ok' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response
ok' = response' Status.ok
-- | 201
created :: forall m. MonadAff m => m Response
created = created' empty
-- | 201 with headers
created' :: forall m. MonadAff m => ResponseHeaders -> m Response
created' = emptyResponse' Status.created
-- | 202
accepted :: forall m. MonadAff m => m Response
accepted = accepted' empty
-- | 202 with headers
accepted' :: forall m. MonadAff m => ResponseHeaders -> m Response
accepted' = emptyResponse' Status.accepted
-- | 203
nonAuthoritativeInformation :: forall m b. MonadAff m => Body b => b -> m Response
nonAuthoritativeInformation = nonAuthoritativeInformation' empty
-- | 203 with headers
nonAuthoritativeInformation' ::
forall m b.
MonadAff m =>
Body b =>
ResponseHeaders ->
b ->
m Response
nonAuthoritativeInformation' = response' Status.nonAuthoritativeInformation
-- | 204
noContent :: forall m. MonadAff m => m Response
noContent = noContent' empty
-- | 204 with headers
noContent' :: forall m. MonadAff m => ResponseHeaders -> m Response
noContent' = emptyResponse' Status.noContent
-- | 205
resetContent :: forall m. MonadAff m => m Response
resetContent = resetContent' empty
-- | 205 with headers
resetContent' :: forall m. MonadAff m => ResponseHeaders -> m Response
resetContent' = emptyResponse' Status.resetContent
-- | 206
partialContent :: forall m b. MonadAff m => Body b => b -> m Response
partialContent = partialContent' empty
-- | 206 with headers
partialContent' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response
partialContent' = response' Status.partialContent
-- | 207
multiStatus :: forall m b. MonadAff m => Body b => b -> m Response
multiStatus = multiStatus' empty
-- | 207 with headers
multiStatus' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response
multiStatus' = response' Status.multiStatus
-- | 208
alreadyReported :: forall m. MonadAff m => m Response
alreadyReported = alreadyReported' empty
-- | 208 with headers
alreadyReported' :: forall m. MonadAff m => ResponseHeaders -> m Response
alreadyReported' = emptyResponse' Status.alreadyReported
-- | 226
iMUsed :: forall m b. MonadAff m => Body b => b -> m Response
iMUsed = iMUsed' empty
-- | 226 with headers
iMUsed' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response
iMUsed' = response' Status.iMUsed
---------
-- 3xx --
---------
-- | 300
multipleChoices :: forall m b. MonadAff m => Body b => b -> m Response
multipleChoices = multipleChoices' empty
-- | 300 with headers
multipleChoices' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response
multipleChoices' = response' Status.multipleChoices
-- | 301
movedPermanently :: forall m b. MonadAff m => Body b => b -> m Response
movedPermanently = movedPermanently' empty
-- | 301 with headers
movedPermanently' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response
movedPermanently' = response' Status.movedPermanently
-- | 302
found :: forall m b. MonadAff m => Body b => b -> m Response
found = found' empty
-- | 302 with headers
found' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response
found' = response' Status.found
-- | 303
seeOther :: forall m b. MonadAff m => Body b => b -> m Response
seeOther = seeOther' empty
-- | 303 with headers
seeOther' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response
seeOther' = response' Status.seeOther
-- | 304
notModified :: forall m. MonadAff m => m Response
notModified = notModified' empty
-- | 304 with headers
notModified' :: forall m. MonadAff m => ResponseHeaders -> m Response
notModified' = emptyResponse' Status.notModified
-- | 305
useProxy :: forall m b. MonadAff m => Body b => b -> m Response
useProxy = useProxy' empty
-- | 305 with headers
useProxy' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response
useProxy' = response' Status.useProxy
-- | 307
temporaryRedirect :: forall m b. MonadAff m => Body b => b -> m Response
temporaryRedirect = temporaryRedirect' empty
-- | 307 with headers
temporaryRedirect' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response
temporaryRedirect' = response' Status.temporaryRedirect
-- | 308
permanentRedirect :: forall m b. MonadAff m => Body b => b -> m Response
permanentRedirect = permanentRedirect' empty
-- | 308 with headers
permanentRedirect' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response
permanentRedirect' = response' Status.permanentRedirect
---------
-- 4xx --
---------
-- | 400
badRequest :: forall m b. MonadAff m => Body b => b -> m Response
badRequest = badRequest' empty
-- | 400 with headers
badRequest' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response
badRequest' = response' Status.badRequest
-- | 401
unauthorized :: forall m. MonadAff m => m Response
unauthorized = unauthorized' empty
-- | 401 with headers
unauthorized' :: forall m. MonadAff m => ResponseHeaders -> m Response
unauthorized' = emptyResponse' Status.unauthorized
-- | 402
paymentRequired :: forall m. MonadAff m => m Response
paymentRequired = paymentRequired' empty
-- | 402 with headers
paymentRequired' :: forall m. MonadAff m => ResponseHeaders -> m Response
paymentRequired' = emptyResponse' Status.paymentRequired
-- | 403
forbidden :: forall m. MonadAff m => m Response
forbidden = forbidden' empty
-- | 403 with headers
forbidden' :: forall m. MonadAff m => ResponseHeaders -> m Response
forbidden' = emptyResponse' Status.forbidden
-- | 404
notFound :: forall m. MonadAff m => m Response
notFound = notFound' empty
-- | 404 with headers
notFound' :: forall m. MonadAff m => ResponseHeaders -> m Response
notFound' = emptyResponse' Status.notFound
-- | 405
methodNotAllowed :: forall m. MonadAff m => m Response
methodNotAllowed = methodNotAllowed' empty
-- | 405 with headers
methodNotAllowed' :: forall m. MonadAff m => ResponseHeaders -> m Response
methodNotAllowed' = emptyResponse' Status.methodNotAllowed
-- | 406
notAcceptable :: forall m. MonadAff m => m Response
notAcceptable = notAcceptable' empty
-- | 406 with headers
notAcceptable' :: forall m. MonadAff m => ResponseHeaders -> m Response
notAcceptable' = emptyResponse' Status.notAcceptable
-- | 407
proxyAuthenticationRequired :: forall m. MonadAff m => m Response
proxyAuthenticationRequired = proxyAuthenticationRequired' empty
-- | 407 with headers
proxyAuthenticationRequired' :: forall m. MonadAff m => ResponseHeaders -> m Response
proxyAuthenticationRequired' = emptyResponse' Status.proxyAuthenticationRequired
-- | 408
requestTimeout :: forall m. MonadAff m => m Response
requestTimeout = requestTimeout' empty
-- | 408 with headers
requestTimeout' :: forall m. MonadAff m => ResponseHeaders -> m Response
requestTimeout' = emptyResponse' Status.requestTimeout
-- | 409
conflict :: forall m b. MonadAff m => Body b => b -> m Response
conflict = conflict' empty
-- | 409 with headers
conflict' :: forall m b. MonadAff m => Body b => ResponseHeaders -> b -> m Response
conflict' = response' Status.conflict
-- | 410
gone :: forall m. MonadAff m => m Response
gone = gone' empty
-- | 410 with headers
gone' :: forall m. MonadAff m => ResponseHeaders -> m Response
gone' = emptyResponse' Status.gone
-- | 411
lengthRequired :: forall m. MonadAff m => m Response
lengthRequired = lengthRequired' empty
-- | 411 with headers
lengthRequired' :: forall m. MonadAff m => ResponseHeaders -> m Response
lengthRequired' = emptyResponse' Status.lengthRequired
-- | 412
preconditionFailed :: forall m. MonadAff m => m Response
preconditionFailed = preconditionFailed' empty
-- | 412 with headers
preconditionFailed' :: forall m. MonadAff m => ResponseHeaders -> m Response
preconditionFailed' = emptyResponse' Status.preconditionFailed
-- | 413
payloadTooLarge :: forall m. MonadAff m => m Response
payloadTooLarge = payloadTooLarge' empty
-- | 413 with headers
payloadTooLarge' :: forall m. MonadAff m => ResponseHeaders -> m Response
payloadTooLarge' = emptyResponse' Status.payloadTooLarge
-- | 414
uRITooLong :: forall m. MonadAff m => m Response
uRITooLong = uRITooLong' empty
-- | 414 with headers
uRITooLong' :: forall m. MonadAff m => ResponseHeaders -> m Response
uRITooLong' = emptyResponse' Status.uRITooLong
-- | 415
unsupportedMediaType :: forall m. MonadAff m => m Response
unsupportedMediaType = unsupportedMediaType' empty
-- | 415 with headers
unsupportedMediaType' :: forall m. MonadAff m => ResponseHeaders -> m Response
unsupportedMediaType' = emptyResponse' Status.unsupportedMediaType
-- | 416
rangeNotSatisfiable :: forall m. MonadAff m => m Response
rangeNotSatisfiable = rangeNotSatisfiable' empty
-- | 416 with headers
rangeNotSatisfiable' :: forall m. MonadAff m => ResponseHeaders -> m Response
rangeNotSatisfiable' = emptyResponse' Status.rangeNotSatisfiable
-- | 417
expectationFailed :: forall m. MonadAff m => m Response
expectationFailed = expectationFailed' empty
-- | 417 with headers
expectationFailed' :: forall m. MonadAff m => ResponseHeaders -> m Response
expectationFailed' = emptyResponse' Status.expectationFailed
-- | 418
imATeapot :: forall m. MonadAff m => m Response
imATeapot = imATeapot' empty
-- | 418 with headers
imATeapot' :: forall m. MonadAff m => ResponseHeaders -> m Response
imATeapot' = emptyResponse' Status.imATeapot
-- | 421
misdirectedRequest :: forall m. MonadAff m => m Response
misdirectedRequest = misdirectedRequest' empty
-- | 421 with headers
misdirectedRequest' :: forall m. MonadAff m => ResponseHeaders -> m Response
misdirectedRequest' = emptyResponse' Status.misdirectedRequest
-- | 422
unprocessableEntity :: forall m. MonadAff m => m Response
unprocessableEntity = unprocessableEntity' empty
-- | 422 with headers
unprocessableEntity' :: forall m. MonadAff m => ResponseHeaders -> m Response
unprocessableEntity' = emptyResponse' Status.unprocessableEntity
-- | 423
locked :: forall m. MonadAff m => m Response
locked = locked' empty
-- | 423 with headers
locked' :: forall m. MonadAff m => ResponseHeaders -> m Response
locked' = emptyResponse' Status.locked
-- | 424
failedDependency :: forall m. MonadAff m => m Response
failedDependency = failedDependency' empty
-- | 424 with headers
failedDependency' :: forall m. MonadAff m => ResponseHeaders -> m Response
failedDependency' = emptyResponse' Status.failedDependency
-- | 426
upgradeRequired :: forall m. MonadAff m => m Response
upgradeRequired = upgradeRequired' empty
-- | 426 with headers
upgradeRequired' :: forall m. MonadAff m => ResponseHeaders -> m Response
upgradeRequired' = emptyResponse' Status.upgradeRequired
-- | 428
preconditionRequired :: forall m. MonadAff m => m Response
preconditionRequired = preconditionRequired' empty
-- | 428 with headers
preconditionRequired' :: forall m. MonadAff m => ResponseHeaders -> m Response
preconditionRequired' = emptyResponse' Status.preconditionRequired
-- | 429
tooManyRequests :: forall m. MonadAff m => m Response
tooManyRequests = tooManyRequests' empty
-- | 429 with headers
tooManyRequests' :: forall m. MonadAff m => ResponseHeaders -> m Response
tooManyRequests' = emptyResponse' Status.tooManyRequests
-- | 431
requestHeaderFieldsTooLarge :: forall m. MonadAff m => m Response
requestHeaderFieldsTooLarge = requestHeaderFieldsTooLarge' empty
-- | 431 with headers
requestHeaderFieldsTooLarge' :: forall m. MonadAff m => ResponseHeaders -> m Response
requestHeaderFieldsTooLarge' = emptyResponse' Status.requestHeaderFieldsTooLarge
-- | 451
unavailableForLegalReasons :: forall m. MonadAff m => m Response
unavailableForLegalReasons = unavailableForLegalReasons' empty
-- | 451 with headers
unavailableForLegalReasons' :: forall m. MonadAff m => ResponseHeaders -> m Response
unavailableForLegalReasons' = emptyResponse' Status.unavailableForLegalReasons
---------
-- 5xx --
---------
-- | 500
internalServerError :: forall m b. MonadAff m => Body b => b -> m Response
internalServerError = internalServerError' empty
-- | 500 with headers
internalServerError' ::
forall m b.
MonadAff m =>
Body b =>
ResponseHeaders ->
b ->
m Response
internalServerError' = response' Status.internalServerError
-- | 501
notImplemented :: forall m. MonadAff m => m Response
notImplemented = notImplemented' empty
-- | 501 with headers
notImplemented' :: forall m. MonadAff m => ResponseHeaders -> m Response
notImplemented' = emptyResponse' Status.notImplemented
-- | 502
badGateway :: forall m. MonadAff m => m Response
badGateway = badGateway' empty
-- | 502 with headers
badGateway' :: forall m. MonadAff m => ResponseHeaders -> m Response
badGateway' = emptyResponse' Status.badGateway
-- | 503
serviceUnavailable :: forall m. MonadAff m => m Response
serviceUnavailable = serviceUnavailable' empty
-- | 503 with headers
serviceUnavailable' :: forall m. MonadAff m => ResponseHeaders -> m Response
serviceUnavailable' = emptyResponse' Status.serviceUnavailable
-- | 504
gatewayTimeout :: forall m. MonadAff m => m Response
gatewayTimeout = gatewayTimeout' empty
-- | 504 with headers
gatewayTimeout' :: forall m. MonadAff m => ResponseHeaders -> m Response
gatewayTimeout' = emptyResponse' Status.gatewayTimeout
-- | 505
hTTPVersionNotSupported :: forall m. MonadAff m => m Response
hTTPVersionNotSupported = hTTPVersionNotSupported' empty
-- | 505 with headers
hTTPVersionNotSupported' :: forall m. MonadAff m => ResponseHeaders -> m Response
hTTPVersionNotSupported' = emptyResponse' Status.hTTPVersionNotSupported
-- | 506
variantAlsoNegotiates :: forall m. MonadAff m => m Response
variantAlsoNegotiates = variantAlsoNegotiates' empty
-- | 506 with headers
variantAlsoNegotiates' :: forall m. MonadAff m => ResponseHeaders -> m Response
variantAlsoNegotiates' = emptyResponse' Status.variantAlsoNegotiates
-- | 507
insufficientStorage :: forall m. MonadAff m => m Response
insufficientStorage = insufficientStorage' empty
-- | 507 with headers
insufficientStorage' :: forall m. MonadAff m => ResponseHeaders -> m Response
insufficientStorage' = emptyResponse' Status.insufficientStorage
-- | 508
loopDetected :: forall m. MonadAff m => m Response
loopDetected = loopDetected' empty
-- | 508 with headers
loopDetected' :: forall m. MonadAff m => ResponseHeaders -> m Response
loopDetected' = emptyResponse' Status.loopDetected
-- | 510
notExtended :: forall m. MonadAff m => m Response
notExtended = notExtended' empty
-- | 510 with headers
notExtended' :: forall m. MonadAff m => ResponseHeaders -> m Response
notExtended' = emptyResponse' Status.notExtended
-- | 511
networkAuthenticationRequired :: forall m. MonadAff m => m Response
networkAuthenticationRequired = networkAuthenticationRequired' empty
-- | 511 with headers
networkAuthenticationRequired' :: forall m. MonadAff m => ResponseHeaders -> m Response
networkAuthenticationRequired' = emptyResponse' Status.networkAuthenticationRequired