Considers the container as ready when a http request is successful.
Summary
Functions
Creates a new HttpWaitStrategy to wait until a http requests succeeds.
Types
@type t() :: %Testcontainers.HttpWaitStrategy{ endpoint: String.t(), headers: [{binary(), binary()}], match: (map() -> boolean()), max_retries: term(), method: :get | :post | :patch | :put | :delete | :head | :options | :trace, port: integer(), protocol: String.t(), status_code: integer(), timeout: integer() }
The HttpWaitStrategy struct
Options
:endpoint- The endpoint to request:port- The exposed port of your container
Verification Options:
:status_code- Check if the request responds with the given status code:match- Run your custom matcher on the given response. A 1-arity function taking a response as first parameter and must return a boolean
Request Options:
:protocol- which protocol to use, defaults tohttp:method- the request method, one of [:head,:get,:delete,:trace,:options,:post,:put,:patch]:timeout- The timeout of the request (in milliseconds), defaults to5000:headers- Apply any headers to your request