Preparing search index...
The search index is not available
@tarpit/http
@tarpit/http
TpResponse
Class TpResponse
Hierarchy
TpResponse
Index
Constructors
constructor
Properties
_body?
_cache_
control?
_status?
request
res
Accessors
body
cache_
control
content_
type
etag
headers
last_
modified
length
message
socket
status
writable
Methods
append
clear
first
flush_
headers
get
has
is
merge
redirect
remove
set
Constructors
constructor
new
Tp
Response
(
res
,
request
)
:
TpResponse
Parameters
res
:
ServerResponse
<
IncomingMessage
>
request
:
TpRequest
Returns
TpResponse
Properties
Private
Optional
_body
_body
?:
TpHttpResponseType
= undefined
Private
Optional
_cache_
control
_cache_
control
?:
ResponseCacheControl
Private
Optional
_status
_status
?:
number
= undefined
Readonly
request
request
:
TpRequest
Readonly
res
res
:
ServerResponse
<
IncomingMessage
>
Accessors
body
get
body
(
)
:
TpHttpResponseType
Returns
TpHttpResponseType
set
body
(
val
)
:
void
Parameters
val
:
TpHttpResponseType
Returns
void
cache_
control
get
cache_control
(
)
:
undefined
|
ResponseCacheControl
Returns
undefined
|
ResponseCacheControl
set
cache_control
(
value
)
:
void
Parameters
value
:
undefined
|
ResponseCacheControl
Returns
void
content_
type
get
content_type
(
)
:
undefined
|
string
Returns
undefined
|
string
set
content_type
(
type
)
:
void
Parameters
type
:
undefined
|
string
Returns
void
etag
get
etag
(
)
:
undefined
|
string
Returns
undefined
|
string
headers
get
headers
(
)
:
OutgoingHttpHeaders
Returns
OutgoingHttpHeaders
last_
modified
get
last_modified
(
)
:
undefined
|
number
Returns
undefined
|
number
length
get
length
(
)
:
undefined
|
number
Returns
undefined
|
number
set
length
(
n
)
:
void
Parameters
n
:
undefined
|
null
|
number
Returns
void
message
get
message
(
)
:
string
Returns
string
set
message
(
msg
)
:
void
Parameters
msg
:
string
Returns
void
socket
get
socket
(
)
:
null
|
Socket
Returns
null
|
Socket
status
get
status
(
)
:
number
Returns
number
set
status
(
status_code
)
:
void
Parameters
status_code
:
number
Returns
void
writable
get
writable
(
)
:
boolean
Returns
boolean
Methods
append
append
(
field
,
val
)
:
void
Parameters
field
:
string
val
:
string
|
number
|
string
[]
Returns
void
clear
clear
(
)
:
void
Returns
void
first
first
(
field
)
:
undefined
|
string
Parameters
field
:
string
Returns
undefined
|
string
flush_
headers
flush_
headers
(
)
:
void
Returns
void
get
get
(
field
)
:
undefined
|
string
|
string
[]
Parameters
field
:
string
Returns
undefined
|
string
|
string
[]
has
has
(
field
)
:
boolean
Parameters
field
:
string
Returns
boolean
is
is
(
type
,
...
types
)
:
undefined
|
string
Parameters
type
:
string
Rest
...
types
:
string
[]
Returns
undefined
|
string
merge
merge
(
headers
)
:
void
Parameters
headers
:
Record
<
string
,
OutgoingHttpHeader
>
Returns
void
redirect
redirect
(
url
,
status
?
)
:
never
Parameters
url
:
string
status
:
number
= 302
Returns
never
remove
remove
(
field
)
:
void
Parameters
field
:
string
Returns
void
set
set
(
field
,
val
)
:
void
Parameters
field
:
string
val
:
undefined
|
null
|
string
|
number
|
string
[]
Returns
void
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
src
errors
finish.ts
Finish
finish
tp-http-finish.ts
TpHttpFinish
TpHttpErrorDescription
TpHttpErrorHeader
throw_bad_request
throw_forbidden
throw_http_finish
throw_internal_server_error
throw_not_found
throw_not_modified
throw_precondition_failed
throw_unauthorized
builtin
body
form-body.ts
FormBody
json-body.ts
JsonBody
mime-body.ts
MimeBody
raw-body.ts
RawBody
text-body.ts
TextBody
dict
params.ts
Params
path-args.ts
PathArgs
header.ts
RequestHeaders
guard.ts
Guard
http-context.ts
HttpContext
response-cache.ts
ResponseCache
tp-request.ts
TpRequest
tp-response.ts
TpResponse
tp-websocket.ts
TpWebSocket
services
http-authenticator.ts
HttpAuthenticator
http-body-formatter.ts
HttpBodyFormatter
http-cache-proxy.ts
HttpCacheProxy
http-hooks.ts
HttpHooks
http-inspector.ts
HttpInspector
http-static.ts
HttpStatic
http-server.module.ts
HttpServerModule
__types__.ts
HttpCredentials
HttpHandlerDescriptor
HttpSession
TpRouterOptions
TpWebSocketOptions
ApiMethod
HttpResponseType
ProxyConfig
RequestHandler
RequestHandlerWithPathArgs
SocketHandler
TpHttpResponseType
UpgradeHandler
UpgradeHandlerWithPathArgs
annotations.ts
Auth
CacheUnder
ContentType
Delete
Get
Post
Put
Route
RouteProps
TpRouter
WS
Auth
CacheUnder
ContentType
Delete
Get
Post
Put
Route
TpRouter
WS
Generated using
TypeDoc