ballerina/http2.2.0
Overview
This module provides APIs for connecting and interacting with HTTP and HTTP2 endpoints. It
facilitates two types of network entry points as the Client
and Listener
.
Client
The Client
is used to connect to and interact with HTTP endpoints. They support connection pooling and can be
configured to have a maximum number of active connections that can be made with the remote endpoint. The Client
activates connection eviction after a given idle period and also supports follow-redirects so that you do not
have to manually handle 3xx HTTP status codes.
Resiliency
The Client
handles resilience in multiple ways such as load balancing, circuit breaking, endpoint timeouts, and via a
retry mechanism.
Load balancing is used in the round-robin or failover manner.
When a failure occurs in the remote service, the client connections might wait for some time before a timeout occurs. Awaiting requests consume resources in the system. Circuit Breakers are used to trip after a certain number of failed requests to the remote service. Once a circuit breaker trips, it does not allow the client to send requests to the remote service for a period of time.
The Ballerina circuit breaker supports tripping on HTTP error status codes and I/O errors. Failure thresholds can be
configured based on a sliding window (e.g., 5 failures within 10 seconds). The Client
also supports a retry
mechanism that allows it to resend failed requests periodically for a given number of times.
Security
The Client
supports Server Name Indication (SNI), Certificate Revocation List (CRL), Online Certificate Status
Protocol (OCSP), and OCSP Stapling for SSL/TLS connections.
Also, the Client
can be configured to send authentication information to the endpoint being invoked. Ballerina has
built-in support for Basic authentication, JWT authentication, and OAuth2 authentication.
In addition to that, it supports both HTTP/1.1 and HTTP2 protocols and connection keep-alive, content
chunking, HTTP caching, data compression/decompression, response payload binding, and authorization can be highlighted as the features of the Clients
.
A Client
can be defined using the URL of the remote service that it needs to connect with as shown below:
1http:Client clientEndpoint = check new("https://my-simple-backend.com");
The defined Client
endpoint can be used to call a remote service as follows:
1// Send a GET request to the specified endpoint.2http:Response response = check clientEndpoint->get("/get?id=123");
The payload can be retrieved as the return value from the remote function as follows:
1// Retrieve payload as json.2json payload = check clientEndpoint->post("/backend/Json", "foo", targetType = json);
Listener
The Listener
is the underneath server connector that binds the given IP/Port to the network and it's behavior can
be changed using the http:ListenerConfiguration
. In HTTP, the http:Service
-typed services can be attached to
the Listener
. The service type precisely describes the syntax for both the service and resource.
A Service
represents a collection of network-accessible entry points and can be exposed via a Listener
endpoint.
A resource represents one such entry point and can have its own path, HTTP methods, body format, consumes
and
produces
content types, CORS headers, etc. In resources, the HTTP method and resource path are mandatory parameters and
the String literal and path parameters can be stated as the path. The resource function accepts the http:Caller
, http:Request
,
http:Headers
, query parameters, header parameters, and payload parameters as arguments. However, they are optional.
When a Service
receives a request, it is dispatched to the best-matched resource.
A Listener
endpoint can be defined as follows:
1// Attributes associated with the `Listener` endpoint are defined here.2listener http:Listener helloWorldEP = new(9090);
Then a Service
can be defined and attached to the above Listener
endpoint as shown below:
1// By default, Ballerina assumes that the service is to be exposed via HTTP/1.1.2service /helloWorld on helloWorldEP {34 resource function post [string name](@http:Payload string message) returns string {5 // Sends the response back to the client along with a string payload.6 return "Hello, World! I’m " + name + ". " + message;7 }8}
Security
Listener
endpoints can be exposed via SSL. They support Mutual SSL, Hostname Verification, and Application Layer
Protocol Negotiation (ALPN) for HTTP2. Listener
endpoints also support Certificate Revocation List (CRL), Online
Certificate Status Protocol (OCSP), and OCSP Stapling.
Also, The listener
can be configured to authenticate and authorize the inbound requests. Ballerina has
built-in support for basic authentication, JWT authentication, and OAuth2 authentication.
In addition to that, supports both the HTTP/1.1 and HTTP2 protocols and connection keep-alive, content
chunking, HTTP caching, data compression/decompression, payload binding, and authorization can be highlighted as the features of a Service
.
Listeners
[1]
Listener | This is used for creating HTTP server endpoints. |
Clients
[14]
Caller | The caller actions for responding to client requests. |
CircuitBreakerClient | A Circuit Breaker implementation which can be used to gracefully handle network failures. |
Client | The HTTP client provides the capability for initiating contact with a remote HTTP service. |
ClientOAuth2Handler | Defines the OAuth2 handler for client authentication. |
CookieClient | Provides the cookie functionality across HTTP client actions. |
FailoverClient | An HTTP client endpoint which provides failover support over multiple HTTP clients. |
HttpCachingClient | An HTTP caching client implementation which takes an |
HttpClient | Lies inside every type of client in the chain holding the native client connector. |
HttpSecureClient | Provides secure HTTP remote functions for interacting with HTTP endpoints. |
ListenerLdapUserStoreBasicAuthHandler | Defines the LDAP store Basic Auth handler for listener authentication. |
ListenerOAuth2Handler | Defines the OAuth2 handler for listener authentication. |
LoadBalanceClient | LoadBalanceClient endpoint provides load balancing functionality over multiple HTTP clients. |
RedirectClient | Provides redirect functionality for HTTP client remote functions. |
RetryClient | Provides the HTTP remote functions for interacting with an HTTP endpoint. |
Functions
[5]
authenticateResource | Uses for declarative auth design, where the authentication/authorization decision is taken
by reading the auth annotations provided in service/resource and the |
createHttpCachingClient | Creates an HTTP client capable of caching HTTP responses. |
createHttpSecureClient | Creates an HTTP client capable of securing HTTP requests with authentication. |
invokeEndpoint | The HEAD remote function implementation of the Circuit Breaker. |
parseHeader | Parses the header value which contains multiple values or parameters. |
Classes
[61]
ClientBasicAuthHandler | Defines the Basic Auth handler for client authentication. |
ClientBearerTokenAuthHandler | Defines the Bearer token auth handler for client authentication. |
ClientSelfSignedJwtAuthHandler | Defines the self signed JWT handler for client authentication. |
Cookie | Represents a Cookie. |
CookieStore | Represents the cookie store. |
CsvPersistentCookieHandler | Represents a default persistent cookie handler, which stores persistent cookies in a CSV file. |
Headers | Represents the headers of the inbound request. |
HttpCache | Implements a cache for storing HTTP responses. |
HttpFuture | Represents a 'future' that returns as a result of an asynchronous HTTP request submission. |
ListenerFileUserStoreBasicAuthHandler | Defines the file store Basic Auth handler for listener authentication. |
ListenerJwtAuthHandler | Defines the JWT auth handler for listener authentication. |
LoadBalancerRoundRobinRule | Implementation of round robin load balancing strategy. |
PushPromise | Represents an HTTP/2 |
Request | Represents an HTTP request. |
RequestCacheControl | Configures the cache control directives for an |
RequestContext | Represents an HTTP Context that allows user to pass data between filters. |
Response | Represents an HTTP response. |
ResponseCacheControl | Configures cache control directives for an |
StatusAccepted | Represents the status code of |
StatusBadGateway | Represents the status code of |
StatusBadRequest | Represents the status code of |
StatusConflict | Represents the status code of |
StatusContinue | Represents the status code of |
StatusCreated | Represents the status code of |
StatusExpectationFailed | Represents the status code of |
StatusForbidden | Represents the status code of |
StatusFound | Represents the status code of |
StatusGatewayTimeout | Represents the status code of |
StatusGone | Represents the status code of |
StatusHttpVersionNotSupported | Represents the status code of |
StatusInternalServerError | Represents the status code of |
StatusLengthRequired | Represents the status code of |
StatusMethodNotAllowed | Represents the status code of |
StatusMovedPermanently | Represents the status code of |
StatusMultipleChoices | Represents the status code of |
StatusNoContent | Represents the status code of |
StatusNonAuthoritativeInformation | Represents the status code of |
StatusNotAcceptable | Represents the status code of |
StatusNotFound | Represents the status code of |
StatusNotImplemented | Represents the status code of |
StatusNotModified | Represents the status code of |
StatusOK | Represents the status code of |
StatusPartialContent | Represents the status code of |
StatusPayloadTooLarge | Represents the status code of |
StatusPaymentRequired | Represents the status code of |
StatusPermanentRedirect | Represents the status code of |
StatusPreconditionFailed | Represents the status code of |
StatusProxyAuthenticationRequired | Represents the status code of |
StatusRangeNotSatisfiable | Represents the status code of |
StatusRequestHeaderFieldsTooLarge | Represents the status code of |
StatusRequestTimeout | Represents the status code of |
StatusResetContent | Represents the status code of |
StatusSeeOther | Represents the status code of |
StatusServiceUnavailable | Represents the status code of |
StatusSwitchingProtocols | Represents the status code of |
StatusTemporaryRedirect | Represents the status code of |
StatusUnauthorized | Represents the status code of |
StatusUnsupportedMediaType | Represents the status code of |
StatusUpgradeRequired | Represents the status code of |
StatusUriTooLong | Represents the status code of |
StatusUseProxy | Represents the status code of |
Object types
[7]
ClientObject | The representation of the http Client object type for managing resilient clients. |
LoadBalancerRule | LoadBalancerRule object type provides a required abstraction to implement different algorithms. |
PersistentCookieHandler | The representation of a persistent cookie handler object type for managing persistent cookies. |
RequestErrorInterceptor | The HTTP request error interceptor service object type |
RequestInterceptor | The HTTP request interceptor service object type |
Service | The HTTP service type. |
Status | The |
Records
[105]
Accepted | The status code response record of |
AccessLogConfiguration | Represents HTTP access log configuration. |
BadGateway | The status code response record of |
BadRequest | The status code response record of |
BearerTokenConfig | Represents token for Bearer token authentication. |
Bucket | Represents a discrete sub-part of the time window (Bucket). |
CacheConfig | Provides a set of configurations for controlling the caching behaviour of the endpoint. |
CertKey | Represents combination of certificate, private key and private key password if encrypted. |
CircuitBreakerConfig | Provides a set of configurations for controlling the behaviour of the Circuit Breaker. |
CircuitBreakerInferredConfig | Derived set of configurations from the |
CircuitHealth | Maintains the health of the Circuit Breaker. |
ClientConfiguration | Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint. |
ClientHttp1Settings | Provides settings related to HTTP/1.x protocol. |
ClientHttp2Settings | Provides settings related to HTTP/2 protocol. |
ClientSecureSocket | Provides configurations for facilitating secure communication with a remote HTTP endpoint. |
CommonClientConfiguration | Common client configurations for the next level clients. |
CommonResponse | The common attributed of response status code record type. |
CompressionConfig | A record for providing configurations for content compression. |
Conflict | The status code response record of |
Continue | The status code response record of |
CookieConfig | Client configuration for cookies. |
CookieOptions | The options to be used when initializing the |
CorsConfig | Configurations for CORS support. |
Created | The status code response record of |
CredentialsConfig | Represents credentials for Basic Auth authentication. |
Detail | Represents the details of an HTTP error. |
ExpectationFailed | The status code response record of |
FailoverClientConfiguration | Provides a set of HTTP related configurations and failover related configurations. |
FileUserStoreConfig | Represents file user store configurations for Basic Auth authentication. |
FileUserStoreConfigWithScopes | Represents the auth annotation for file user store configurations with scopes. |
FollowRedirects | Provides configurations for controlling the endpoint's behaviour in response to HTTP redirect related responses. |
Forbidden | The status code response record of |
Found | The status code response record of |
GatewayTimeout | The status code response record of |
Gone | The status code response record of |
HeaderValue | Represents the parsed header value details |
HttpCacheConfig | Defines the HTTP response cache configuration. |
HttpCallerInfo | Configures the typing details type of the Caller resource signature parameter. |
HttpHeader | Defines the Header resource signature parameter. |
HttpPayload | Defines the Payload resource signature parameter and return parameter. |
HttpResourceConfig | Configuration for an HTTP resource. |
HttpServiceConfig | Contains the configurations for an HTTP service. |
HttpVersionNotSupported | The status code response record of |
InferredListenerConfiguration | Provides a set of cloneable configurations for HTTP listener. |
InternalServerError | The status code response record of |
JwtIssuerConfig | Represents JWT issuer configurations for JWT authentication. |
JwtValidatorConfig | Represents JWT validator configurations for JWT authentication. |
JwtValidatorConfigWithScopes | Represents the auth annotation for JWT validator configurations with scopes. |
LdapUserStoreConfig | Represents LDAP user store configurations for Basic Auth authentication. |
LdapUserStoreConfigWithScopes | Represents the auth annotation for LDAP user store configurations with scopes. |
LengthRequired | The status code response record of |
Link | Represents a server-provided hyperlink |
Links | Represents available server-provided links |
ListenerConfiguration | Provides a set of configurations for HTTP service endpoints. |
ListenerHttp1Settings | Provides settings related to HTTP/1.x protocol. |
ListenerSecureSocket | Configures the SSL/TLS options to be used for HTTP service. |
LoadBalanceActionErrorData | Represents the details of the |
LoadBalanceClientConfiguration | The configurations related to the load balancing client endpoint. |
Local | Presents a read-only view of the local address. |
MethodNotAllowed | The status code response record of |
MovedPermanently | The status code response record of |
MultipleChoices | The status code response record of |
MutualSslHandshake | A record for providing mutual SSL handshake results. |
NoContent | The status code response record of |
NonAuthoritativeInformation | The status code response record of |
NotAcceptable | The status code response record of |
NotFound | The status code response record of |
NotImplemented | The status code response record of |
NotModified | The status code response record of |
OAuth2ClientCredentialsGrantConfig | Represents OAuth2 client credentials grant configurations for OAuth2 authentication. |
OAuth2IntrospectionConfig | Represents OAuth2 introspection server configurations for OAuth2 authentication. |
OAuth2IntrospectionConfigWithScopes | Represents the auth annotation for OAuth2 introspection server configurations with scopes. |
OAuth2JwtBearerGrantConfig | Represents OAuth2 JWT bearer grant configurations for OAuth2 authentication. |
OAuth2PasswordGrantConfig | Represents OAuth2 password grant configurations for OAuth2 authentication. |
OAuth2RefreshTokenGrantConfig | Represents OAuth2 refresh token grant configurations for OAuth2 authentication. |
Ok | The status code response record of |
PartialContent | The status code response record of |
PayloadTooLarge | The status code response record of |
PaymentRequired | The status code response record of |
PermanentRedirect | The status code response record of |
PoolConfiguration | Configurations for managing HTTP client connection pool. |
PreconditionFailed | The status code response record of |
ProxyAuthenticationRequired | The status code response record of |
ProxyConfig | Proxy server configurations to be used with the HTTP client endpoint. |
RangeNotSatisfiable | The status code response record of |
Remote | Presents a read-only view of the remote address. |
RequestHeaderFieldsTooLarge | The status code response record of |
RequestLimitConfigs | Provides inbound request URI, total header and entity body size threshold configurations. |
RequestTimeout | The status code response record of |
ResetContent | The status code response record of |
ResponseLimitConfigs | Provides inbound response status line, total header and entity body size threshold configurations. |
RetryConfig | Provides configurations for controlling the retrying behavior in failure scenarios. |
RollingWindow | Represents a rolling window in the Circuit Breaker. |
Scopes | Represents the annotation used for authorization. |
SeeOther | The status code response record of |
ServiceUnavailable | The status code response record of |
SwitchingProtocols | The status code response record of |
TargetService | Represents a single service and its related configurations. |
TemporaryRedirect | The status code response record of |
TraceLogAdvancedConfiguration | Represents HTTP trace log configuration. |
Unauthorized | The status code response record of |
UnsupportedMediaType | The status code response record of |
UpgradeRequired | The status code response record of |
UriTooLong | The status code response record of |
UseProxy | The status code response record of |
Constants
[123]
AGE | HTTP header key |
AUTH_HEADER | Represents the Authorization header name. |
AUTH_SCHEME_BASIC | The prefix used to denote the Basic authentication scheme. |
AUTH_SCHEME_BEARER | The prefix used to denote the Bearer authentication scheme. |
AUTHORIZATION | HTTP header key |
CACHE_CONTROL | HTTP header key |
CACHE_CONTROL_AND_VALIDATORS | This is a more restricted mode of RFC 7234. |
CB_CLOSED_STATE | Represents the closed state of the circuit. |
CB_HALF_OPEN_STATE | Represents the half-open state of the circuit. |
CB_OPEN_STATE | Represents the open state of the circuit. |
CHUNKING_ALWAYS | Always set chunking header in the response. |
CHUNKING_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_NEVER | Never set the chunking header even if the payload is larger than 8KB in the outbound request/response. |
COMPRESSION_ALWAYS | Always set accept-encoding/content-encoding in outbound request/response. |
COMPRESSION_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_NEVER | Never set accept-encoding/content-encoding header in outbound request/response. |
CONNECTION | HTTP header key |
CONTENT_LENGTH | HTTP header key |
CONTENT_TYPE | HTTP header key |
DATE | HTTP header key |
ETAG | HTTP header key |
EXPECT | HTTP header key |
EXPIRES | HTTP header key |
FAILED | Mutual SSL handshake has failed. |
HTTP_DELETE | Constant for the HTTP DELETE method |
HTTP_FORWARD | Constant for the HTTP FORWARD method |
HTTP_GET | Constant for the HTTP GET method |
HTTP_HEAD | Constant for the HTTP HEAD method |
HTTP_NONE | Constant for the identify not an HTTP Operation |
HTTP_OPTIONS | Constant for the HTTP OPTIONS method |
HTTP_PATCH | Constant for the HTTP PATCH method |
HTTP_POST | Constant for the HTTP POST method |
HTTP_PUT | Constant for the HTTP PUT method |
HTTP_SUBMIT | constant for the HTTP SUBMIT method |
IF_MATCH | HTTP header key |
IF_MODIFIED_SINCE | HTTP header key |
IF_NONE_MATCH | HTTP header key |
IF_RANGE | HTTP header key |
IF_UNMODIFIED_SINCE | HTTP header key |
KEEPALIVE_ALWAYS | Keeps the connection alive irrespective of the |
KEEPALIVE_AUTO | Decides to keep the connection alive or not based on the |
KEEPALIVE_NEVER | Closes the connection irrespective of the |
LAST_MODIFIED | HTTP header key |
LEADING | Header is placed before the payload of the request/response. |
LOCATION | HTTP header key |
MAX_AGE | When used in requests, |
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. |
MAX_STALE_ANY_AGE | Setting this as the |
MIN_FRESH | Indicates that the client is only accepting responses whose freshness lifetime >= current age + min-fresh. |
MULTIPART_AS_PRIMARY_TYPE | Represents multipart primary type |
MUST_REVALIDATE | Indicates that once the response has become stale, it should not be reused for subsequent requests without validating with the origin server. |
NO_CACHE | Forces the cache to validate a cached response with the origin server before serving. |
NO_STORE | Instructs the cache to not store a response in non-volatile storage. |
NO_TRANSFORM | Instructs intermediaries not to transform the payload. |
NONE | Not a mutual ssl connection. |
ONLY_IF_CACHED | Indicates that the client is only willing to accept a cached response. |
PASSED | Mutual SSL handshake is successful. |
PRAGMA | HTTP header key |
PRIVATE | Indicates that the response is intended for a single user and should not be stored by shared caches. |
PROXY_AUTHORIZATION | HTTP header key |
PROXY_REVALIDATE | Has the same semantics as |
PUBLIC | Indicates that any cache may store the response. |
REDIRECT_FOUND_302 | Represents the HTTP redirect status code |
REDIRECT_MOVED_PERMANENTLY_301 | Represents the HTTP redirect status code |
REDIRECT_MULTIPLE_CHOICES_300 | Represents the HTTP redirect status code |
REDIRECT_NOT_MODIFIED_304 | Represents the HTTP redirect status code |
REDIRECT_PERMANENT_REDIRECT_308 | Represents the HTTP redirect status code |
REDIRECT_SEE_OTHER_303 | Represents the HTTP redirect status code |
REDIRECT_TEMPORARY_REDIRECT_307 | Represents the HTTP redirect status code |
REDIRECT_USE_PROXY_305 | Represents the HTTP redirect status code |
REQUEST_METHOD | Constant for the request method reference. |
RESOURCE_NAME | Constant for the resource name reference. |
RFC_7234 | Caching behaviour is as specified by the RFC 7234 specification. |
S_MAX_AGE | In shared caches, |
SERVER | HTTP header key |
SERVICE_NAME | Constant for the service name reference. |
STATUS_ACCEPTED | The HTTP response status code: 202 Accepted |
STATUS_BAD_GATEWAY | The HTTP response status code: 502 Bad Gateway |
STATUS_BAD_REQUEST | The HTTP response status code: 400 Bad Request |
STATUS_CONFLICT | The HTTP response status code: 409 Conflict |
STATUS_CONTINUE | The HTTP response status code: 100 Continue |
STATUS_CREATED | The HTTP response status code: 201 Created |
STATUS_EXPECTATION_FAILED | The HTTP response status code: 417 Expectation Failed |
STATUS_FORBIDDEN | The HTTP response status code: 403 Forbidden |
STATUS_FOUND | The HTTP response status code: 302 Found |
STATUS_GATEWAY_TIMEOUT | The HTTP response status code: 504 Gateway Timeout |
STATUS_GONE | The HTTP response status code: 410 Gone |
STATUS_HTTP_VERSION_NOT_SUPPORTED | The HTTP response status code: 505 HTTP Version Not Supported |
STATUS_INTERNAL_SERVER_ERROR | The HTTP response status code: 500 Internal Server Error |
STATUS_LENGTH_REQUIRED | The HTTP response status code: 411 Length Required |
STATUS_METHOD_NOT_ALLOWED | The HTTP response status code: 405 Method Not Allowed |
STATUS_MOVED_PERMANENTLY | The HTTP response status code: 301 Moved Permanently |
STATUS_MULTIPLE_CHOICES | The HTTP response status code: 300 Multiple Choices |
STATUS_NO_CONTENT | The HTTP response status code: 204 No Content |
STATUS_NON_AUTHORITATIVE_INFORMATION | The HTTP response status code: 203 Non Authoritative Information |
STATUS_NOT_ACCEPTABLE | The HTTP response status code: 406 Not Acceptable |
STATUS_NOT_FOUND | The HTTP response status code: 404 Not Found |
STATUS_NOT_IMPLEMENTED | The HTTP response status code: 501 Not Implemented |
STATUS_NOT_MODIFIED | The HTTP response status code: 304 Not Modified |
STATUS_OK | The HTTP response status code: 200 OK |
STATUS_PARTIAL_CONTENT | The HTTP response status code: 206 Partial Content |
STATUS_PAYLOAD_TOO_LARGE | The HTTP response status code: 413 Payload Too Large |
STATUS_PAYMENT_REQUIRED | The HTTP response status code: 402 Payment Required |
STATUS_PERMANENT_REDIRECT | The HTTP response status code: 308 Permanent Redirect |
STATUS_PRECONDITION_FAILED | The HTTP response status code: 412 Precondition Failed |
STATUS_PROXY_AUTHENTICATION_REQUIRED | The HTTP response status code: 407 Proxy Authentication Required |
STATUS_RANGE_NOT_SATISFIABLE | The HTTP response status code: 416 Range Not Satisfiable |
STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE | The HTTP response status code: 431 Request Header Fields Too Large |
STATUS_REQUEST_TIMEOUT | The HTTP response status code: 408 Request Timeout |
STATUS_RESET_CONTENT | The HTTP response status code: 205 Reset Content |
STATUS_SEE_OTHER | The HTTP response status code: 303 See Other |
STATUS_SERVICE_UNAVAILABLE | The HTTP response status code: 503 Service Unavailable |
STATUS_SWITCHING_PROTOCOLS | The HTTP response status code: 101 Switching Protocols |
STATUS_TEMPORARY_REDIRECT | The HTTP response status code: 307 Temporary Redirect |
STATUS_UNAUTHORIZED | The HTTP response status code: 401 Unauthorized |
STATUS_UNSUPPORTED_MEDIA_TYPE | The HTTP response status code: 415 Unsupported Media Type |
STATUS_UPGRADE_REQUIRED | The HTTP response status code: 426 Upgrade Required |
STATUS_URI_TOO_LONG | The HTTP response status code: 414 URI Too Long |
STATUS_USE_PROXY | The HTTP response status code: 305 Use Proxy |
TRAILING | Header is placed after the payload of the request/response. |
TRANSFER_ENCODING | HTTP header key |
UPGRADE | HTTP header key |
WARNING | HTTP header key |
Enums
[4]
CertValidationType | Represents certification validation type options. |
Method | Represents HTTP methods. |
Protocol | Represents protocol options. |
VerifyClient | Represents client verify options. |
Annotations
[6]
Cache | The annotation which is used to define the response cache configuration. |
CallerInfo | The annotation which is used to configure the type of the response. |
Header | The annotation which is used to define the Header resource signature parameter. |
Payload | The annotation which is used to define the Payload resource signature parameter and return parameter. |
ResourceConfig | The annotation which is used to configure an HTTP resource. |
ServiceConfig | The annotation which is used to configure an HTTP service. |
Types
[20]
CachingPolicy | Used for configuring the caching behaviour. |
Chunking | Defines the possible values for the chunking configuration in HTTP services and clients. |
CircuitState | A finite type for modeling the states of the Circuit Breaker. |
ClientAuthConfig | Defines the authentication configurations for the HTTP client. |
Compression | Options to compress using gzip or deflate. |
HeaderPosition | Defines the position of the headers in the request/response. |
HttpOperation | Defines the HTTP operations related to circuit breaker, failover and load balancer. |
HttpVersion | Defines the supported HTTP protocols. |
KeepAlive | Defines the possible values for the keep-alive configuration in service and client endpoints. |
ListenerAuthConfig | Defines the authentication configurations for the HTTP listener. |
LoadBalanceActionError | Represents an error occurred in an remote function of the Load Balance connector. |
MutualSslStatus | Defines the possible values for the mutual ssl status. |
NextService | The return type of an interceptor service function |
OAuth2GrantConfig | Represents OAuth2 grant configurations for OAuth2 authentication. |
PayloadType | The types of the response payload that are returned by the HTTP |
RedirectCode | Defines the HTTP redirect codes as a type. |
RequestMessage | The types of messages that are accepted by HTTP |
ResponseMessage | The types of messages that are accepted by HTTP |
StatusCodeResponse | Defines the possible status code response record types. |
TargetType | The types of data values that are expected by the HTTP |
Errors
[45]
AllLoadBalanceEndpointsFailedError | Represents a client error that occurred due to all the load balance endpoint failure. |
AllRetryAttemptsFailed | Represents a client error that occurred due to all the the retry attempts failure. |
ApplicationResponseError | Represents both 4XX and 5XX application response client error. |
CircuitBreakerConfigError | Represents a client error that occurred due to circuit breaker configuration error. |
ClientAuthError | Defines the Auth error types that returned from client. |
ClientError | Defines the possible client error types. |
ClientRequestError | Represents an error, which occurred due to bad syntax or incomplete info in the client request(4xx HTTP response). |
CookieHandlingError | Represents a cookie error that occurred when using the cookies. |
Error | Defines the common error type for the module. |
FailoverActionFailedError | Represents a client error that occurred due to failover action failure. |
FailoverAllEndpointsFailedError | Represents a client error that occurred due to all the failover endpoint failure. |
GenericClientError | Represents a generic client error. |
GenericListenerError | Represents a generic listener error. |
HeaderNotFoundError | Represents a header not found error when retrieving headers. |
Http2ClientError | Represents an HTTP/2 client generic error. |
IdleTimeoutError | Represents the error that triggered upon a request/response idle timeout. |
InboundRequestError | Defines the listener error types that returned while receiving inbound request. |
InboundResponseError | Defines the client error types that returned while receiving inbound response. |
InitializingInboundRequestError | Represents a listener error that occurred due to inbound request initialization failure. |
InitializingInboundResponseError | Represents a client error that occurred due to inbound response initialization failure. |
InitializingOutboundRequestError | Represents a client error that occurred due to outbound request initialization failure. |
InitializingOutboundResponseError | Represents a listener error that occurred due to outbound response initialization failure. |
Initiating100ContinueResponseError | Represents an error that occurred due to 100 continue response initialization failure. |
InvalidCookieError | Represents a cookie error that occurred when sending cookies in the response. |
ListenerAuthError | Defines the Auth error types that returned from listener. |
ListenerError | Defines the possible listener error types. |
MaximumWaitTimeExceededError | Represents a client error that occurred exceeding maximum wait time. |
NoContentError | Represents an error, which occurred due to the absence of the payload. |
OutboundRequestError | Defines the client error types that returned while sending outbound request. |
OutboundResponseError | Defines the listener error types that returned while sending outbound response. |
PayloadBindingError | Represents an error, which occurred due to a payload binding. |
ReadingInboundRequestBodyError | Represents a listener error that occurred while writing the inbound request entity body. |
ReadingInboundRequestHeadersError | Represents a listener error that occurred while reading inbound request headers. |
ReadingInboundResponseBodyError | Represents a client error that occurred while reading inbound response entity body. |
ReadingInboundResponseHeadersError | Represents a client error that occurred while reading inbound response headers. |
RemoteServerError | Represents an error, which occurred due to a failure of the remote server(5xx HTTP response). |
ResiliencyError | Defines the resiliency error types that returned from client. |
SslError | Represents a client error that occurred due to SSL failure. |
UnsupportedActionError | Represents a client error that occurred due to unsupported action invocation. |
UpstreamServiceUnavailableError | Represents a client error that occurred due to upstream service unavailability. |
Writing100ContinueResponseError | Represents an error that occurred while writing 100 continue response. |
WritingOutboundRequestBodyError | Represents a client error that occurred while writing outbound request entity body. |
WritingOutboundRequestHeadersError | Represents a client error that occurred while writing outbound request headers. |
WritingOutboundResponseBodyError | Represents a listener error that occurred while writing outbound response entity body. |
WritingOutboundResponseHeadersError | Represents a listener error that occurred while writing outbound response headers. |