final class HttpProtocolBuilder extends ProtocolBuilder
DSL for building HTTP protocol configurations
Immutable, so all methods return a new occurrence and leave the original unmodified.
- Alphabetic
- By Inheritance
- HttpProtocolBuilder
- ProtocolBuilder
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new HttpProtocolBuilder(wrapped: http.protocol.HttpProtocolBuilder)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def acceptCharsetHeader(value: Function[Session, String]): HttpProtocolBuilder
Set the accept-charset header
Set the accept-charset header
- value
the header value, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def acceptCharsetHeader(value: String): HttpProtocolBuilder
Set the accept-charset header
Set the accept-charset header
- value
the header value, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def acceptEncodingHeader(value: Function[Session, String]): HttpProtocolBuilder
Set the accept-encoding header
Set the accept-encoding header
- value
the header value, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def acceptEncodingHeader(value: String): HttpProtocolBuilder
Set the accept-encoding header
Set the accept-encoding header
- value
the header value, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def acceptHeader(value: Function[Session, String]): HttpProtocolBuilder
Set the accept header
Set the accept header
- value
the header value, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def acceptHeader(value: String): HttpProtocolBuilder
Set the accept header
Set the accept header
- value
the header value, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def acceptLanguageHeader(value: Function[Session, String]): HttpProtocolBuilder
Set the accept-language header
Set the accept-language header
- value
the header value, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def acceptLanguageHeader(value: String): HttpProtocolBuilder
Set the accept-language header
Set the accept-language header
- value
the header value, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asyncNameResolution(dnsServers: Array[InetSocketAddress]): HttpProtocolBuilder
Enable Gatling non-blocking DNS resolution instead of using Java's blocking implementation
Enable Gatling non-blocking DNS resolution instead of using Java's blocking implementation
- dnsServers
the DNS servers
- returns
a new HttpProtocolBuilder instance
- def asyncNameResolution(dnsServers: <repeated...>[String]): HttpProtocolBuilder
Enable Gatling non-blocking DNS resolution instead of using Java's blocking implementation
Enable Gatling non-blocking DNS resolution instead of using Java's blocking implementation
- dnsServers
the DNS servers
- returns
a new HttpProtocolBuilder instance
- def authorizationHeader(value: Function[Session, String]): HttpProtocolBuilder
Set the authorization header
Set the authorization header
- value
the header value, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def authorizationHeader(value: String): HttpProtocolBuilder
Set the authorization header
Set the authorization header
- value
the header value, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def baseUrl(url: String): HttpProtocolBuilder
Define the baseUrl that will be used as a prefix for all relative urls
Define the baseUrl that will be used as a prefix for all relative urls
- url
the base url
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def baseUrls(urls: List[String]): HttpProtocolBuilder
Define multiple baseUrls that will be used as a prefix for all relative urls.
Define multiple baseUrls that will be used as a prefix for all relative urls. Assigned once per virtual user based on a round-robin strategy.
- urls
the base urls
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def baseUrls(urls: <repeated...>[String]): HttpProtocolBuilder
Define multiple baseUrls that will be used as a prefix for all relative urls.
Define multiple baseUrls that will be used as a prefix for all relative urls. Assigned once per virtual user based on a round-robin strategy.
- urls
the base urls
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def basicAuth(username: Function[Session, String], password: Function[Session, String]): HttpProtocolBuilder
Set the authorization header for Basic Auth
Set the authorization header for Basic Auth
- username
the username, expressed as a function
- password
the password, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def basicAuth(username: Function[Session, String], password: String): HttpProtocolBuilder
Set the authorization header for Basic Auth
Set the authorization header for Basic Auth
- username
the username, expressed as a function
- password
the password, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def basicAuth(username: String, password: Function[Session, String]): HttpProtocolBuilder
Set the authorization header for Basic Auth
Set the authorization header for Basic Auth
- username
the username, expressed as a Gatling Expression Language String
- password
the password, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def basicAuth(username: String, password: String): HttpProtocolBuilder
Set the authorization header for Basic Auth
Set the authorization header for Basic Auth
- username
the username, expressed as a Gatling Expression Language String
- password
the password, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def check(checks: List[CheckBuilder]): HttpProtocolBuilder
Define some common checks to be applied on all the requests.
Define some common checks to be applied on all the requests.
- checks
the checks
- returns
a new HttpProtocolBuilder instance
- def check(checks: <repeated...>[CheckBuilder]): HttpProtocolBuilder
Define some common checks to be applied on all the requests.
Define some common checks to be applied on all the requests.
- checks
the checks
- returns
a new HttpProtocolBuilder instance
- def checkIf(condition: BiFunction[Response, Session, Boolean]): TypedCondition
Define some common checks to be applied on all the requests when a condition holds true.
Define some common checks to be applied on all the requests when a condition holds true.
- condition
a condition, expressed as a function that's aware of the HTTP response and the Session
- returns
the next DSL step
- def checkIf(condition: String): UntypedCondition
Define some common checks to be applied on all the requests when a condition holds true.
Define some common checks to be applied on all the requests when a condition holds true.
- condition
a condition, expressed as a Gatling Expression Language String
- returns
the next DSL step
- def checkIf(condition: Function[Session, Boolean]): UntypedCondition
Define some common checks to be applied on all the requests when a condition holds true.
Define some common checks to be applied on all the requests when a condition holds true.
- condition
a condition, expressed as a function
- returns
the next DSL step
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def connectionHeader(value: Function[Session, String]): HttpProtocolBuilder
Set the connection header
Set the connection header
- value
the header value, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def connectionHeader(value: String): HttpProtocolBuilder
Set the connection header
Set the connection header
- value
the header value, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def contentTypeHeader(value: Function[Session, String]): HttpProtocolBuilder
Set the content-type header
Set the content-type header
- value
the header value, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def contentTypeHeader(value: String): HttpProtocolBuilder
Set the content-type header
Set the content-type header
- value
the header value, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def digestAuth(username: Function[Session, String], password: Function[Session, String]): HttpProtocolBuilder
Set the authorization header for Digest Auth
Set the authorization header for Digest Auth
- username
the username, expressed as a function
- password
the password, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def digestAuth(username: Function[Session, String], password: String): HttpProtocolBuilder
Set the authorization header for Digest Auth
Set the authorization header for Digest Auth
- username
the username, expressed as a function
- password
the password, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def digestAuth(username: String, password: Function[Session, String]): HttpProtocolBuilder
Set the authorization header for Digest Auth
Set the authorization header for Digest Auth
- username
the username, expressed as a Gatling Expression Language String
- password
the password, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def digestAuth(username: String, password: String): HttpProtocolBuilder
Set the authorization header for Digest Auth
Set the authorization header for Digest Auth
- username
the username, expressed as a Gatling Expression Language String
- password
the password, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def disableAutoOrigin(): HttpProtocolBuilder
Disable the automatic Origin header generation, based the request url.
Disable the automatic Origin header generation, based the request url.
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def disableAutoReferer(): HttpProtocolBuilder
Disable the automatic Referer header generation, based on previous requests.
Disable the automatic Referer header generation, based on previous requests.
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def disableCaching(): HttpProtocolBuilder
Disable HTTP caching.
Disable HTTP caching.
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def disableFollowRedirect(): HttpProtocolBuilder
Disable automatically following redirects
Disable automatically following redirects
- returns
a new HttpProtocolBuilder instance
- def disableUrlEncoding(): HttpProtocolBuilder
Disable the automatic url encoding that tries to detect unescaped reserved chars
Disable the automatic url encoding that tries to detect unescaped reserved chars
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def disableWarmUp(): HttpProtocolBuilder
Disable the warmup
Disable the warmup
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def doNotTrackHeader(value: Function[Session, String]): HttpProtocolBuilder
Set the do-not-track header
Set the do-not-track header
- value
the header value, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def doNotTrackHeader(value: String): HttpProtocolBuilder
Set the do-not-track header
Set the do-not-track header
- value
the header value, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def enableHttp2(): HttpProtocolBuilder
Enable HTTP/2
Enable HTTP/2
- returns
a new HttpProtocolBuilder instance
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def header(name: CharSequence, value: Function[Session, String]): HttpProtocolBuilder
Set a header that's common to all HTTP requests
Set a header that's common to all HTTP requests
- name
the static header name
- value
the header value, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def header(name: CharSequence, value: String): HttpProtocolBuilder
Set a header that's common to all HTTP requests
Set a header that's common to all HTTP requests
- name
the static header name
- value
the header value, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def headers(headers: Map[_ <: CharSequence, String]): HttpProtocolBuilder
Set multiple headers that's common to all HTTP requests
Set multiple headers that's common to all HTTP requests
- headers
the headers, names are static but values are expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def hostNameAliases(aliases: Map[String, List[String]]): HttpProtocolBuilder
Define some aliases to bypass DNS name resolution
Define some aliases to bypass DNS name resolution
- aliases
the aliases
- returns
a new HttpProtocolBuilder instance
- def http2PriorKnowledge(remotes: Map[String, Boolean]): HttpProtocolBuilder
Define the remote hosts that are known to support or not support HTTP/2
Define the remote hosts that are known to support or not support HTTP/2
- remotes
the known remote hosts
- returns
a new HttpProtocolBuilder instance
- def inferHtmlResources(deny: DenyList): HttpProtocolBuilder
Automatically infer resources from HTML payloads
Automatically infer resources from HTML payloads
- deny
the deny list to filter out the resources
- returns
a new HttpProtocolBuilder instance
- def inferHtmlResources(allow: AllowList, deny: DenyList): HttpProtocolBuilder
Automatically infer resources from HTML payloads
Automatically infer resources from HTML payloads
- allow
the allow list to filter the resources
- deny
the deny list to filter out the resources
- returns
a new HttpProtocolBuilder instance
- def inferHtmlResources(allow: AllowList): HttpProtocolBuilder
Automatically infer resources from HTML payloads
Automatically infer resources from HTML payloads
- allow
the allow list to filter the resources
- returns
a new HttpProtocolBuilder instance
- def inferHtmlResources(): HttpProtocolBuilder
Automatically infer resources from HTML payloads
Automatically infer resources from HTML payloads
- returns
a new HttpProtocolBuilder instance
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def localAddress(address: String): HttpProtocolBuilder
Define the local address to bind from
Define the local address to bind from
- address
the local address
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def localAddresses(addresses: List[String]): HttpProtocolBuilder
Define multiple local addresses to bind from.
Define multiple local addresses to bind from. Assigned once per virtual user based on a round-robin strategy.
- addresses
the local addresses
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def localAddresses(addresses: <repeated...>[String]): HttpProtocolBuilder
Define multiple local addresses to bind from.
Define multiple local addresses to bind from. Assigned once per virtual user based on a round-robin strategy.
- addresses
the local addresses
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def maxConnectionsPerHost(max: Int): HttpProtocolBuilder
Define an HTTP/1.1 connections per host limit for fetching concurrent resources
Define an HTTP/1.1 connections per host limit for fetching concurrent resources
- max
the limit
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def maxRedirects(max: Int): HttpProtocolBuilder
Define the maximum number of redirects in a redirect chain
Define the maximum number of redirects in a redirect chain
- max
the limit
- returns
a new HttpProtocolBuilder instance
- def nameInferredHtmlResources(f: Function[Uri, String]): HttpProtocolBuilder
Name the inferred resources' requests based on the provided function
Name the inferred resources' requests based on the provided function
- f
the naming function, aware of the full uri
- returns
a new HttpProtocolBuilder instance
- def nameInferredHtmlResourcesAfterAbsoluteUrl(): HttpProtocolBuilder
Name the inferred resources' requests based on the absolute url
Name the inferred resources' requests based on the absolute url
- returns
a new HttpProtocolBuilder instance
- def nameInferredHtmlResourcesAfterLastPathElement(): HttpProtocolBuilder
Name the inferred resources' requests based on the last element of the path
Name the inferred resources' requests based on the last element of the path
- returns
a new HttpProtocolBuilder instance
- def nameInferredHtmlResourcesAfterPath(): HttpProtocolBuilder
Name the inferred resources' requests based on the path
Name the inferred resources' requests based on the path
- returns
a new HttpProtocolBuilder instance
- def nameInferredHtmlResourcesAfterRelativeUrl(): HttpProtocolBuilder
Name the inferred resources' requests based on the relative url
Name the inferred resources' requests based on the relative url
- returns
a new HttpProtocolBuilder instance
- def nameInferredHtmlResourcesAfterUrlTail(): HttpProtocolBuilder
Name the inferred resources' requests based on the tail of the url
Name the inferred resources' requests based on the tail of the url
- returns
a new HttpProtocolBuilder instance
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noProxyFor(hosts: <repeated...>[String]): HttpProtocolBuilder
Ignore any configured proxy for some hosts
Ignore any configured proxy for some hosts
- hosts
the hosts that must be connected directly without the proxy
- returns
a new HttpProtocolBuilder instance
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def originHeader(value: Function[Session, String]): HttpProtocolBuilder
Set the origin header
Set the origin header
- value
the header value, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def originHeader(value: String): HttpProtocolBuilder
Set the origin header
Set the origin header
- value
the header value, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def perUserKeyManagerFactory(f: Function[Long, KeyManagerFactory]): HttpProtocolBuilder
Define a function to assign a
KeyManagerFactory
per virtual user.Define a function to assign a
KeyManagerFactory
per virtual user.- f
the function. Input is the virtual user's unique id
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def perUserNameResolution(): HttpProtocolBuilder
Force each virtual user to have its own DNS cache and perform its own DNS resolutions instead of using a global shared resolver
Force each virtual user to have its own DNS cache and perform its own DNS resolutions instead of using a global shared resolver
- returns
a new HttpProtocolBuilder instance
- def protocol(): Protocol
- Definition Classes
- HttpProtocolBuilder → ProtocolBuilder
- def proxy(proxy: Proxy): HttpProtocolBuilder
Define a Proxy to be used for all requests
Define a Proxy to be used for all requests
- proxy
the proxy
- returns
a new HttpProtocolBuilder instance
- def proxyProtocolSourceIpV4Address(address: Function[Session, String]): HttpProtocolBuilder
Enable Proxy Protocol for IPv4
Enable Proxy Protocol for IPv4
- address
a fake local address in IPv4 format
- returns
a new HttpProtocolBuilder instance
- def proxyProtocolSourceIpV4Address(address: String): HttpProtocolBuilder
Enable Proxy Protocol for IPv4
Enable Proxy Protocol for IPv4
- address
a fake local address in IPv4 format
- returns
a new HttpProtocolBuilder instance
- def proxyProtocolSourceIpV6Address(address: Function[Session, String]): HttpProtocolBuilder
Enable Proxy Protocol for IPv6
Enable Proxy Protocol for IPv6
- address
a fake local address in IPv6 format
- returns
a new HttpProtocolBuilder instance
- def proxyProtocolSourceIpV6Address(address: String): HttpProtocolBuilder
Enable Proxy Protocol for IPv6
Enable Proxy Protocol for IPv6
- address
a fake local address in IPv6 format
- returns
a new HttpProtocolBuilder instance
- def redirectNamingStrategy(f: RedirectNamingStrategy): HttpProtocolBuilder
Define a naming strategy for requests generated from a redirect
Define a naming strategy for requests generated from a redirect
- f
the strategy
- returns
a new HttpProtocolBuilder instance
- def shareConnections(): HttpProtocolBuilder
Share a global connection pool and a global
javax.net.ssl.SSLContext
amongst virtual users instead of each having its own.Share a global connection pool and a global
javax.net.ssl.SSLContext
amongst virtual users instead of each having its own. Makes sense if you don't want to generate mob browser traffic but server to server traffic.- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def sign(calculator: BiFunction[Request, Session, Request]): HttpProtocolBuilder
Provide a function to sign the requests before writing them on the wire.
Provide a function to sign the requests before writing them on the wire. This version provides access to the session.
- calculator
the signing function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def sign(calculator: Function[Request, Request]): HttpProtocolBuilder
Provide a function to sign the requests before writing them on the wire
Provide a function to sign the requests before writing them on the wire
- calculator
the signing function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def signWithOAuth1(consumerKey: Function[Session, String], clientSharedSecret: Function[Session, String], token: Function[Session, String], tokenSecret: Function[Session, String], useAuthorizationHeader: Boolean): HttpProtocolBuilder
Instruct sign the requests with OAuth1 before writing them on the wire
Instruct sign the requests with OAuth1 before writing them on the wire
- consumerKey
the consumerKey, expressed as a function
- clientSharedSecret
the clientSharedSecret, expressed as a function
- token
the token, expressed as a function
- tokenSecret
the tokenSecret, expressed as a function
- useAuthorizationHeader
if true, sign with an Authorization header, otherwise sign forms with extra parameters and other requests with extra query params
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def signWithOAuth1(consumerKey: Function[Session, String], clientSharedSecret: Function[Session, String], token: Function[Session, String], tokenSecret: Function[Session, String]): HttpProtocolBuilder
Instruct sign the requests with an OAuth1 Authorization before writing them on the wire
Instruct sign the requests with an OAuth1 Authorization before writing them on the wire
- consumerKey
the consumerKey, expressed as a function
- clientSharedSecret
the clientSharedSecret, expressed as a function
- token
the token, expressed as a function
- tokenSecret
the tokenSecret, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def signWithOAuth1(consumerKey: String, clientSharedSecret: String, token: String, tokenSecret: String, useAuthorizationHeader: Boolean): HttpProtocolBuilder
Instruct sign the requests with OAuth1 before writing them on the wire
Instruct sign the requests with OAuth1 before writing them on the wire
- consumerKey
the consumerKey, expressed as a Gatling Expression Language String
- clientSharedSecret
the clientSharedSecret, expressed as a Gatling Expression Language String
- token
the token, expressed as a Gatling Expression Language String
- tokenSecret
the tokenSecret, expressed as a Gatling Expression Language String
- useAuthorizationHeader
if true, sign with an Authorization header, otherwise sign forms with extra parameters and other requests with extra query params
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def signWithOAuth1(consumerKey: String, clientSharedSecret: String, token: String, tokenSecret: String): HttpProtocolBuilder
Instruct sign the requests with an OAuth1 Authorization header before writing them on the wire
Instruct sign the requests with an OAuth1 Authorization header before writing them on the wire
- consumerKey
the consumerKey, expressed as a Gatling Expression Language String
- clientSharedSecret
the clientSharedSecret, expressed as a Gatling Expression Language String
- token
the token, expressed as a Gatling Expression Language String
- tokenSecret
the tokenSecret, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def silentResources(): HttpProtocolBuilder
Instruct the reporting engine to not report resources
Instruct the reporting engine to not report resources
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def silentUri(pattern: String): HttpProtocolBuilder
Instruct the reporting engine to not report requests whose uri matches the configured <a href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html">Java Regular Expression pattern
Instruct the reporting engine to not report requests whose uri matches the configured <a href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html">Java Regular Expression pattern
- pattern
the regex pattern
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def sseUnmatchedInboundMessageBufferSize(max: Int): HttpProtocolBuilder
Set the max size of the buffer for unmatched/unchecked inbound SSE messages.
Set the max size of the buffer for unmatched/unchecked inbound SSE messages. 0 by default, meaning such messages are not buffered.
- max
the max size
- returns
a new HttpProtocolBuilder instance
- def strict302Handling(): HttpProtocolBuilder
Apply 302 strictly and not switch to GET and re-send the request body
Apply 302 strictly and not switch to GET and re-send the request body
- returns
a new HttpProtocolBuilder instance
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def transformResponse(f: BiFunction[Response, Session, Response]): HttpProtocolBuilder
Define a transformation function to be applied on the
Response
s before checks are applied.Define a transformation function to be applied on the
Response
s before checks are applied. Typically used for decoding responses, eg with <a href="https://developers.google.com/protocol-buffers">Protobuf.- f
the strategy
- returns
a new HttpProtocolBuilder instance
- def upgradeInsecureRequestsHeader(value: Function[Session, String]): HttpProtocolBuilder
Set the upgrade-insecure-requests header
Set the upgrade-insecure-requests header
- value
the header value, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def upgradeInsecureRequestsHeader(value: String): HttpProtocolBuilder
Set the upgrade-insecure-requests header
Set the upgrade-insecure-requests header
- value
the header value, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def useAllLocalAddresses(): HttpProtocolBuilder
Bind from all detected local addresses.
Bind from all detected local addresses. Assigned once per virtual user based on a round-robin strategy.
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def useAllLocalAddressesMatching(patterns: <repeated...>[String]): HttpProtocolBuilder
Bind from all detected local addresses matching at least one of the configured patterns.
Bind from all detected local addresses matching at least one of the configured patterns. Assigned once per virtual user based on a round-robin strategy.
- patterns
some <a href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html">Java Regular Expression patterns
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def userAgentHeader(value: Function[Session, String]): HttpProtocolBuilder
Set the user-agent header
Set the user-agent header
- value
the header value, expressed as a function
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def userAgentHeader(value: String): HttpProtocolBuilder
Set the user-agent header
Set the user-agent header
- value
the header value, expressed as a Gatling Expression Language String
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def warmUp(url: String): HttpProtocolBuilder
Define the warmup url.
Define the warmup url. Used to perform a blank HTTP request to load the classes in the ClassLoader so the first load test request won't have to pay for this penalty. Hit "https://gatling.io" by default.
- url
the warmup url
- returns
a new HttpProtocolBuilder instance
- Annotations
- @NonNull()
- def wsAutoReplySocketIo4(): HttpProtocolBuilder
Automatically reply to a SocketIo4 ping TEXT frame with the corresponding pong TEXT frame.
Automatically reply to a SocketIo4 ping TEXT frame with the corresponding pong TEXT frame.
- returns
a new HttpProtocolBuilder instance
- def wsAutoReplyTextFrame(f: Function[String, String]): HttpProtocolBuilder
Automatically reply to a TEXT frame with another TEXT frame.
Automatically reply to a TEXT frame with another TEXT frame.
- f
the function
- returns
a new HttpProtocolBuilder instance
- def wsBaseUrl(url: String): HttpProtocolBuilder
Define a baseUrl that will be used as a prefix for all relative WebSocket urls.
Define a baseUrl that will be used as a prefix for all relative WebSocket urls.
- url
the base url
- returns
a new HttpProtocolBuilder instance
- def wsBaseUrls(urls: List[String]): HttpProtocolBuilder
Define multiple baseUrls that will be used as a prefix for all relative WebSocket urls.
Define multiple baseUrls that will be used as a prefix for all relative WebSocket urls. Assigned once per virtual user based on a round-robin strategy.
- urls
the base urls
- returns
a new HttpProtocolBuilder instance
- def wsBaseUrls(urls: <repeated...>[String]): HttpProtocolBuilder
Define multiple baseUrls that will be used as a prefix for all relative WebSocket urls.
Define multiple baseUrls that will be used as a prefix for all relative WebSocket urls. Assigned once per virtual user based on a round-robin strategy.
- urls
the base urls
- returns
a new HttpProtocolBuilder instance
- def wsMaxReconnects(max: Int): HttpProtocolBuilder
Define a maximum number of times a WebSocket can be automatically reconnected
Define a maximum number of times a WebSocket can be automatically reconnected
- max
the limit
- returns
a new HttpProtocolBuilder instance
- def wsReconnect(): HttpProtocolBuilder
Automatically reconnect disconnected WebSockets
Automatically reconnect disconnected WebSockets
- returns
a new HttpProtocolBuilder instance
- def wsUnmatchedInboundMessageBufferSize(max: Int): HttpProtocolBuilder
Set the max size of the buffer for unmatched/unchecked inbound WebSocket messages.
Set the max size of the buffer for unmatched/unchecked inbound WebSocket messages. 0 by default, meaning such messages are not buffered.
- max
the max size
- returns
a new HttpProtocolBuilder instance