Constants -
http
- AUTH_HEADER string Authorization
-
Authorization header name.
- AUTH_HEADER_BEARER string AUTH_HEADER_BEARER
-
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 thanmax-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 themax-age
orexpires
header field.
- MAX_STALE_ANY_AGE int 9223372036854775807
-
Setting this as the
max-stale
directives indicates that themax-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 theetag
orlast-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
.
- 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 thecache-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 theOPEN
state. If not, it will move to theCLOSED
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 theOPEN
state.
- CONTINUE_100 int 100
-
The HTTP response status code: 100 Continue
- SWITCHING_PROTOCOLS_101 int 101
-
The HTTP response status code: 101 Switching Protocols
- OK_200 int 200
-
The HTTP response status code: 200 OK
- CREATED_201 int 201
-
The HTTP response status code: 201 Created
- ACCEPTED_202 int 202
-
The HTTP response status code: 202 Accepted
- NON_AUTHORITATIVE_INFORMATION_203 int 203
-
The HTTP response status code: 203 Non Authoritative Information
- NO_CONTENT_204 int 204
-
The HTTP response status code: 204 No Content
- RESET_CONTENT_205 int 205
-
The HTTP response status code: 205 Reset Content
- PARTIAL_CONTENT_206 int 206
-
The HTTP response status code: 206 Partial Content
- MULTIPLE_CHOICES_300 int 300
-
The HTTP response status code: 300 Multiple Choices
- MOVED_PERMANENTLY_301 int 301
-
The HTTP response status code: 301 Moved Permanently
- FOUND_302 int 302
-
The HTTP response status code: 302 Found
- SEE_OTHER_303 int 303
-
The HTTP response status code: 303 See Other
- NOT_MODIFIED_304 int 304
-
The HTTP response status code: 304 Not Modified
- USE_PROXY_305 int 305
-
The HTTP response status code: 305 Use Proxy
- TEMPORARY_REDIRECT_307 int 307
-
The HTTP response status code: 307 Temporary Redirect
- PERMANENT_REDIRECT_308 int 308
-
The HTTP response status code: 308 Permanent Redirect
- BAD_REQUEST_400 int 400
-
The HTTP response status code: 400 Bad Request
- UNAUTHORIZED_401 int 401
-
The HTTP response status code: 401 Unauthorized
- PAYMENT_REQUIRED_402 int 402
-
The HTTP response status code: 402 Payment Required
- FORBIDDEN_403 int 403
-
The HTTP response status code: 403 Forbidden
- NOT_FOUND_404 int 404
-
The HTTP response status code: 404 Not Found
- METHOD_NOT_ALLOWED_405 int 405
-
The HTTP response status code: 405 Method Not Allowed
- NOT_ACCEPTABLE_406 int 406
-
The HTTP response status code: 406 Not Acceptable
- PROXY_AUTHENTICATION_REQUIRED_407 int 407
-
The HTTP response status code: 407 Proxy Authentication Required
- REQUEST_TIMEOUT_408 int 408
-
The HTTP response status code: 408 Request Timeout
- CONFLICT_409 int 409
-
The HTTP response status code: 409 Conflict
- GONE_410 int 410
-
The HTTP response status code: 410 Gone
- LENGTH_REQUIRED_411 int 411
-
The HTTP response status code: 411 Length Required
- PRECONDITION_FAILED_412 int 412
-
The HTTP response status code: 412 Precondition Failed
- PAYLOAD_TOO_LARGE_413 int 413
-
The HTTP response status code: 413 Payload Too Large
- URI_TOO_LONG_414 int 414
-
The HTTP response status code: 414 URI Too Long
- UNSUPPORTED_MEDIA_TYPE int 415
-
The HTTP response status code: 415 Unsupported Media Type
- RANGE_NOT_SATISFIABLE_416 int 416
-
The HTTP response status code: 416 Range Not Satisfiable
- EXPECTATION_FAILED_417 int 417
-
The HTTP response status code: 417 Expectation Failed
- UPGRADE_REQUIRED_426 int 426
-
The HTTP response status code: 426 Upgrade Required
- INTERNAL_SERVER_ERROR_500 int 500
-
The HTTP response status code: 500 Internal Server Error
- NOT_IMPLEMENTED_501 int 501
-
The HTTP response status code: 501 Not Implemented
- BAD_GATEWAY_502 int 502
-
The HTTP response status code: 502 Bad Gateway
- SERVICE_UNAVAILABLE_503 int 503
-
The HTTP response status code: 503 Service Unavailable
- GATEWAY_TIMEOUT_504 int 504
-
The HTTP response status code: 504 Gateway Timeout
- HTTP_VERSION_NOT_SUPPORTED_505 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 }