Tungsten v0.1.0 Tungsten.CDP.Audits View Source

Audits

Audits domain allows investigation of page violations and possible improvements.

Link to this section Summary

Link to this section Functions

Link to this function

get_encoded_response(session, parameters, options \\ []) View Source
get_encoded_response(
  GenServer.server(),
  %{
    :request_id => Tungsten.CDP.Network.cdp_request_id_type(),
    :encoding => :png | :jpeg | :webp,
    optional(:quality) => integer() | float(),
    optional(:size_only) => boolean()
  },
  Tungsten.Connection.exec_options()
) ::
  {:ok,
   %{
     optional(:body) => String.t(),
     :original_size => integer(),
     :encoded_size => integer()
   }}
  | {:error, term()}

Audits.getEncodedResponse

Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.