v1.2.4
Constants -
http
-
Represents the Authorization header name.
-
Indicates that the authentication credentials should be sent via the Authentication header.
-
POST_BODY_BEARER
string POST_BODY_BEARER
-
Indicates that the Authentication credentials should be sent via the body of the POST request.
-
NO_BEARER
string NO_BEARER
-
Indicates that the authentication credentials should not be sent.
-
STATUS_CODE
string STATUS_CODE
-
Indicates the status code.
-
NO_CACHE
string no-cache
-
Forces the cache to validate a cached response with the origin server before serving.
-
NO_STORE
string no-store
-
Instructs the cache to not store a response in non-volatile storage.
-
NO_TRANSFORM
string no-transform
-
Instructs intermediaries not to transform the payload.
-
MAX_AGE
string max-age
-
When used in requests,
max-age
implies that clients are not willing to accept responses whose age is greater
than max-age
. When used in responses, the response is to be considered stale after the specified
number of seconds.
-
MAX_STALE
string max-stale
-
Indicates that the client is willing to accept responses which have exceeded their freshness lifetime by no more
than the specified number of seconds.
-
MIN_FRESH
string min-fresh
-
Indicates that the client is only accepting responses whose freshness lifetime >= current age + min-fresh.
-
ONLY_IF_CACHED
string only-if-cached
-
Indicates that the client is only willing to accept a cached response. A cached response is served subject to
other constraints posed by the request.
-
MUST_REVALIDATE
string must-revalidate
-
Indicates that once the response has become stale, it should not be reused for subsequent requests without
validating with the origin server.
-
PUBLIC
string public
-
Indicates that any cache may store the response.
-
PRIVATE
string private
-
Indicates that the response is intended for a single user and should not be stored by shared caches.
-
PROXY_REVALIDATE
string proxy-revalidate
-
Has the same semantics as
must-revalidate
, except that this does not apply to private caches.
-
S_MAX_AGE
string s-maxage
-
In shared caches,
s-maxage
overrides the max-age
or expires
header field.
-
MAX_STALE_ANY_AGE
int 9223372036854775807
-
Setting this as the
max-stale
directives indicates that the max-stale
directive does not specify a limit.
-
CACHE_CONTROL_AND_VALIDATORS
string CACHE_CONTROL_AND_VALIDATORS
-
This is a more restricted mode of RFC 7234. Setting this as the caching policy restricts caching to instances
where the
cache-control
header and either the etag
or last-modified
header are present.
-
RFC_7234
string RFC_7234
-
Caching behaviour is as specified by the RFC 7234 specification.
-
HTTP_ERROR_CODE
string {ballerina/http}HTTPError
-
Constant for the http error code
-
MULTIPART_AS_PRIMARY_TYPE
string multipart/
-
Represents multipart primary type
-
HTTP_FORWARD
string FORWARD
-
Constant for the HTTP FORWARD method
-
HTTP_GET
string GET
-
Constant for the HTTP GET method
-
HTTP_POST
string POST
-
Constant for the HTTP POST method
-
HTTP_DELETE
string DELETE
-
Constant for the HTTP DELETE method
-
HTTP_OPTIONS
string OPTIONS
-
Constant for the HTTP OPTIONS method
-
HTTP_PUT
string PUT
-
Constant for the HTTP PUT method
-
HTTP_PATCH
string PATCH
-
Constant for the HTTP PATCH method
-
HTTP_HEAD
string HEAD
-
Constant for the HTTP HEAD method
-
HTTP_SUBMIT
string SUBMIT
-
constant for the HTTP SUBMIT method
-
HTTP_NONE
string NONE
-
Constant for the identify not an HTTP Operation
-
CHUNKING_AUTO
string AUTO
-
If the payload is less than 8KB, content-length header is set in the outbound request/response,
otherwise chunking header is set in the outbound request/response.}
-
CHUNKING_ALWAYS
string ALWAYS
-
Always set chunking header in the response.
-
CHUNKING_NEVER
string NEVER
-
Never set the chunking header even if the payload is larger than 8KB in the outbound request/response.
-
COMPRESSION_AUTO
string AUTO
-
When service behaves as a HTTP gateway inbound request/response accept-encoding option is set as the
outbound request/response accept-encoding/content-encoding option.
-
COMPRESSION_ALWAYS
string ALWAYS
-
Always set accept-encoding/content-encoding in outbound request/response.
-
COMPRESSION_NEVER
string NEVER
-
Never set accept-encoding/content-encoding header in outbound request/response.
-
REDIRECT_MULTIPLE_CHOICES_300
int 300
-
Represents the HTTP redirect status code
300 - Multiple Choices
.
-
REDIRECT_MOVED_PERMANENTLY_301
int 301
-
Represents the HTTP redirect status code
301 - Moved Permanently
.
-
REDIRECT_FOUND_302
int 302
-
Represents the HTTP redirect status code
302 - Found
.
-
REDIRECT_SEE_OTHER_303
int 303
-
Represents the HTTP redirect status code
303 - See Other
.
-
REDIRECT_NOT_MODIFIED_304
int 304
-
Represents the HTTP redirect status code
304 - Not Modified
.
-
REDIRECT_USE_PROXY_305
int 305
-
Represents the HTTP redirect status code
305 - Use Proxy
.
-
REDIRECT_TEMPORARY_REDIRECT_307
int 307
-
Represents the HTTP redirect status code
307 - Temporary Redirect
.
-
REDIRECT_PERMANENT_REDIRECT_308
int 308
-
Represents the HTTP redirect status code
308 - Permanent Redirect
.
-
FAILOVER_ALL_ENDPOINTS_FAILED
string {ballerina/http}FailoverAllEndpointsFailed
-
Represents the reason string for the
http:FailoverAllEndpointsFailedError
-
FAILOVER_ENDPOINT_ACTION_FAILED
string {ballerina/http}FailoverEndpointActionFailed
-
Represents the reason string for the
http:FailoverActionFailedError
-
UPSTREAM_SERVICE_UNAVAILABLE
string {ballerina/http}UpstreamServiceUnavailable
-
Represents the reason string for the
http:UpstreamServiceUnavailableError
-
ALL_LOAD_BALANCE_ENDPOINTS_FAILED
string {ballerina/http}AllLoadBalanceEndpointsFailed
-
Represents the reason string for the
http:AllLoadBalanceEndpointsFailedError
-
ALL_RETRY_ATTEMPTS_FAILED
string {ballerina/http}AllRetryAttemptsFailed
-
Represents the reason string for the
http:AllRetryAttemptsFailed
-
IDLE_TIMEOUT_TRIGGERED
string {ballerina/http}IdleTimeoutError
-
Represents the reason string for the
http:IdleTimeoutError
-
AUTHN_FAILED
string {ballerina/http}AuthenticationFailed
-
Represents the reason string for the
http:AuthenticationError
-
AUTHZ_FAILED
string {ballerina/http}AuthorizationFailed
-
Represents the reason string for the
http:AuthorizationError
-
INIT_OUTBOUND_REQUEST_FAILED
string {ballerina/http}InitializingOutboundRequestFailed
-
Represents the reason string for the
http:InitializingOutboundRequestError
-
Represents the reason string for the
http:WritingOutboundRequestHeadersError
-
WRITING_OUTBOUND_REQUEST_BODY_FAILED
string {ballerina/http}WritingOutboundRequestBodyFailed
-
Represents the reason string for the
http:WritingOutboundRequestBodyError
-
INIT_INBOUND_RESPONSE_FAILED
string {ballerina/http}InitializingInboundResponseFailed
-
Represents the reason string for the
http:InitializingInboundResponseError
-
Represents the reason string for the
http:ReadingInboundResponseBodyError
-
READING_INBOUND_RESPONSE_BODY_FAILED
string {ballerina/http}ReadingInboundResponseBodyFailed
-
Represents the reason string for the
http:ReadingInboundResponseBodyError
-
INIT_INBOUND_REQUEST_FAILED
string {ballerina/http}InitializingInboundRequestFailed
-
Represents the reason string for the
http:InitialingInboundRequestError
-
Represents the reason string for the
http:ReadingInboundRequestHeadersError
-
READING_INBOUND_REQUEST_BODY_FAILED
string {ballerina/http}ReadingInboundRequestBodyFailed
-
Represents the reason string for the
http:ReadingInboundRequestBodyError
-
INIT_OUTBOUND_RESPONSE_FAILED
string {ballerina/http}InitializingOutboundResponseFailed
-
Represents the reason string for the
http:InitializingOutboundResponseError
-
Represents the reason string for the
http:WritingOutboundResponseHeadersError
-
WRITING_OUTBOUND_RESPONSE_BODY_FAILED
string {ballerina/http}WritingOutboundResponseBodyFailed
-
Represents the reason string for the
http:WritingOutboundResponseBodyError
-
INITIATING_100_CONTINUE_RESPONSE_FAILED
string {ballerina/http}Initializing100ContinueResponseFailed
-
Represents the reason string for the
http:Initiating100ContinueResponseError
-
WRITING_100_CONTINUE_RESPONSE_FAILED
string {ballerina/http}Writing100ContinueResponseFailed
-
Represents the reason string for the
http:Writing100ContinueResponseError
-
INVALID_COOKIE_ERROR
string {ballerina/http}InvalidCookieError
-
Represents the reason string for the
http:InvalidCookieError
-
GENERIC_CLIENT_ERROR
string {ballerina/http}GenericClientError
-
Error reason for generic client error
-
GENERIC_LISTENER_ERROR
string {ballerina/http}GenericListenerError
-
Represents the reason string for the
http:GenericListenerError
-
UNSUPPORTED_ACTION
string {ballerina/http}UnsupportedAction
-
Represents the reason string for the
http:UnsupportedActionError
-
HTTP2_CLIENT_ERROR
string {ballerina/http}Http2ClientError
-
Represents the reason string for the
http:Http2ClientError
-
MAXIMUM_WAIT_TIME_EXCEEDED
string {ballerina/http}MaximumWaitTimeExceeded
-
Represents the reason string for the
http:MaximumWaitTimeExceededError
-
SSL_ERROR
string {ballerina/http}SslError
-
Represents the reason string for the
http:SslError
-
COOKIE_HANDLING_ERROR
string {ballerina/http}CookieHandlingError
-
Represents the reason string for the
http:CookieHandlingError
-
AGE
string age
-
HTTP header key
age
. Gives the current age of a cached HTTP response.
-
AUTHORIZATION
string authorization
-
HTTP header key
authorization
-
CACHE_CONTROL
string cache-control
-
HTTP header key
cache-control
. Specifies the cache control directives required for the function of HTTP caches.
-
CONTENT_LENGTH
string content-length
-
HTTP header key
content-length
. Specifies the size of the response body in bytes.
-
CONTENT_TYPE
string content-type
-
HTTP header key
content-type
. Specifies the type of the message payload.
-
DATE
string date
-
HTTP header key
date
. The timestamp at the time the response was generated/received.
-
ETAG
string etag
-
HTTP header key
etag
. A finger print for a resource which is used by HTTP caches to identify whether a
resource representation has changed.
-
EXPECT
string expect
-
HTTP header key
expect
. Specifies expectations to be fulfilled by the server.
-
EXPIRES
string expires
-
HTTP header key
expires
. Specifies the time at which the response becomes stale.
-
IF_MATCH
string if-match
-
HTTP header key
if-match
-
IF_MODIFIED_SINCE
string if-modified-since
-
HTTP header key
if-modified-since
. Used when validating (with the origin server) whether a cached response
is still valid. If the representation of the resource has modified since the timestamp in this field, a
304 response is returned.
-
IF_NONE_MATCH
string if-none-match
-
HTTP header key
if-none-match
. Used when validating (with the origin server) whether a cached response is
still valid. If the ETag provided in this field matches the representation of the requested resource, a
304 response is returned.
-
IF_RANGE
string if-range
-
HTTP header key
if-range
-
IF_UNMODIFIED_SINCE
string if-unmodified-since
-
HTTP header key
if-unmodified-since
-
LAST_MODIFIED
string last-modified
-
HTTP header key
last-modified
. The time at which the resource was last modified.
-
LOCATION
string location
-
HTTP header key
location
. Indicates the URL to redirect a request to.
-
PRAGMA
string pragma
-
HTTP header key
pragma
. Used in dealing with HTTP 1.0 caches which do not understand the cache-control
header.
-
SERVER
string server
-
HTTP header key
server
. Specifies the details of the origin server.
-
WARNING
string warning
-
HTTP header key
warning
. Specifies warnings generated when serving stale responses from HTTP caches.
-
TRANSFER_ENCODING
string transfer-encoding
-
HTTP header key
transfer-encoding
. Specifies what type of transformation has been applied to entity body.
-
CONNECTION
string connection
-
HTTP header key
connection
. Allows the sender to specify options that are desired for that particular connection.
-
UPGRADE
string upgrade
-
HTTP header key
upgrade
. Allows the client to specify what additional communication protocols it supports and
would like to use, if the server finds it appropriate to switch protocols.
-
PASSED
string passed
-
Mutual SSL handshake is successful.
-
FAILED
string failed
-
Mutual SSL handshake has failed.
-
NONE
null null
-
Not a mutual ssl connection.
-
CB_OPEN_STATE
string OPEN
-
Represents the open state of the circuit. When the Circuit Breaker is in
OPEN
state, requests will fail
immediately.
-
CB_HALF_OPEN_STATE
string HALF_OPEN
-
Represents the half-open state of the circuit. When the Circuit Breaker is in
HALF_OPEN
state, a trial request
will be sent to the upstream service. If it fails, the circuit will trip again and move to the OPEN
state. If not,
it will move to the CLOSED
state.
-
CB_CLOSED_STATE
string CLOSED
-
Represents the closed state of the circuit. When the Circuit Breaker is in
CLOSED
state, all requests will be
allowed to go through to the upstream service. If the failures exceed the configured threhold values, the circuit
will trip and move to the OPEN
state.
-
STATUS_CONTINUE
int 100
-
The HTTP response status code: 100 Continue
-
STATUS_SWITCHING_PROTOCOLS
int 101
-
The HTTP response status code: 101 Switching Protocols
-
STATUS_OK
int 200
-
The HTTP response status code: 200 OK
-
STATUS_CREATED
int 201
-
The HTTP response status code: 201 Created
-
STATUS_ACCEPTED
int 202
-
The HTTP response status code: 202 Accepted
-
STATUS_NON_AUTHORITATIVE_INFORMATION
int 203
-
The HTTP response status code: 203 Non Authoritative Information
-
STATUS_NO_CONTENT
int 204
-
The HTTP response status code: 204 No Content
-
STATUS_RESET_CONTENT
int 205
-
The HTTP response status code: 205 Reset Content
-
STATUS_PARTIAL_CONTENT
int 206
-
The HTTP response status code: 206 Partial Content
-
STATUS_MULTIPLE_CHOICES
int 300
-
The HTTP response status code: 300 Multiple Choices
-
STATUS_MOVED_PERMANENTLY
int 301
-
The HTTP response status code: 301 Moved Permanently
-
STATUS_FOUND
int 302
-
The HTTP response status code: 302 Found
-
STATUS_SEE_OTHER
int 303
-
The HTTP response status code: 303 See Other
-
STATUS_NOT_MODIFIED
int 304
-
The HTTP response status code: 304 Not Modified
-
STATUS_USE_PROXY
int 305
-
The HTTP response status code: 305 Use Proxy
-
STATUS_TEMPORARY_REDIRECT
int 307
-
The HTTP response status code: 307 Temporary Redirect
-
STATUS_PERMANENT_REDIRECT
int 308
-
The HTTP response status code: 308 Permanent Redirect
-
STATUS_BAD_REQUEST
int 400
-
The HTTP response status code: 400 Bad Request
-
STATUS_UNAUTHORIZED
int 401
-
The HTTP response status code: 401 Unauthorized
-
STATUS_PAYMENT_REQUIRED
int 402
-
The HTTP response status code: 402 Payment Required
-
STATUS_FORBIDDEN
int 403
-
The HTTP response status code: 403 Forbidden
-
STATUS_NOT_FOUND
int 404
-
The HTTP response status code: 404 Not Found
-
STATUS_METHOD_NOT_ALLOWED
int 405
-
The HTTP response status code: 405 Method Not Allowed
-
STATUS_NOT_ACCEPTABLE
int 406
-
The HTTP response status code: 406 Not Acceptable
-
STATUS_PROXY_AUTHENTICATION_REQUIRED
int 407
-
The HTTP response status code: 407 Proxy Authentication Required
-
STATUS_REQUEST_TIMEOUT
int 408
-
The HTTP response status code: 408 Request Timeout
-
STATUS_CONFLICT
int 409
-
The HTTP response status code: 409 Conflict
-
STATUS_GONE
int 410
-
The HTTP response status code: 410 Gone
-
STATUS_LENGTH_REQUIRED
int 411
-
The HTTP response status code: 411 Length Required
-
STATUS_PRECONDITION_FAILED
int 412
-
The HTTP response status code: 412 Precondition Failed
-
STATUS_PAYLOAD_TOO_LARGE
int 413
-
The HTTP response status code: 413 Payload Too Large
-
STATUS_URI_TOO_LONG
int 414
-
The HTTP response status code: 414 URI Too Long
-
STATUS_UNSUPPORTED_MEDIA_TYPE
int 415
-
The HTTP response status code: 415 Unsupported Media Type
-
STATUS_RANGE_NOT_SATISFIABLE
int 416
-
The HTTP response status code: 416 Range Not Satisfiable
-
STATUS_EXPECTATION_FAILED
int 417
-
The HTTP response status code: 417 Expectation Failed
-
STATUS_UPGRADE_REQUIRED
int 426
-
The HTTP response status code: 426 Upgrade Required
-
STATUS_INTERNAL_SERVER_ERROR
int 500
-
The HTTP response status code: 500 Internal Server Error
-
STATUS_NOT_IMPLEMENTED
int 501
-
The HTTP response status code: 501 Not Implemented
-
STATUS_BAD_GATEWAY
int 502
-
The HTTP response status code: 502 Bad Gateway
-
STATUS_SERVICE_UNAVAILABLE
int 503
-
The HTTP response status code: 503 Service Unavailable
-
STATUS_GATEWAY_TIMEOUT
int 504
-
The HTTP response status code: 504 Gateway Timeout
-
STATUS_HTTP_VERSION_NOT_SUPPORTED
int 505
-
The HTTP response status code: 505 HTTP Version Not Supported
-
KEEPALIVE_AUTO
string AUTO
-
Decides to keep the connection alive or not based on the
connection
header of the client request }
-
KEEPALIVE_ALWAYS
string ALWAYS
-
Keeps the connection alive irrespective of the
connection
header value }
-
KEEPALIVE_NEVER
string NEVER
-
Closes the connection irrespective of the
connection
header value }
-
SERVICE_NAME
string SERVICE_NAME
-
Constant for the service name reference.
-
RESOURCE_NAME
string RESOURCE_NAME
-
Constant for the resource name reference.
-
REQUEST_METHOD
string REQUEST_METHOD
-
Constant for the request method reference.
-
CONNECTION_CLOSURE_ERROR
string {ballerina/http}WsConnectionClosureError
-
Error reason for failures during connection closure
-
INVALID_HANDSHAKE_ERROR
string {ballerina/http}WsInvalidHandshakeError
-
Error reason for WebSocket handshake failures
-
PAYLOAD_TOO_BIG_ERROR
string {ballerina/http}WsPayloadTooBigError
-
Error reason for exceeding maximum frame size
-
PROTOCOL_ERROR
string {ballerina/http}WsProtocolError
-
Error reason for other side breaking the protocol
-
CONNECTION_ERROR
string {ballerina/http}WsConnectionError
-
Error reason for connection failures
-
INVALID_CONTINUATION_FRAME_ERROR
string {ballerina/http}WsInvalidContinuationFrameError
-
Error reason for invalid continuation frame
-
GENERIC_ERROR
string {ballerina/http}WsGenericError
-
Error reason for errors not captured by the specific errors