Sippet.Message.get_and_update_header_front

You're seeing just the function get_and_update_header_front, go back to Sippet.Message module for more information.
Link to this function

get_and_update_header_front(message, header, fun)

View Source

Specs

get_and_update_header_front(
  t(),
  header(),
  (multiple_value() -> {get, multiple_value()} | :pop)
) :: {get, t()}
when get: multiple_value()

Gets the first value from header and updates it, all in one pass.

fun is called with the current first value under header in message (or nil if key is not present in message) and must return a two-element tuple: the "get" value (the retrieved value, which can be operated on before being returned) and the new value to be stored under header in the resulting new message. fun may also return :pop, which means the current value shall be removed from message and returned (making this function behave like Sippet.Message.pop_header_front(message, header). The returned value is a tuple with the "get" value returned by fun and a new message with the updated values under header.