<commit_before>package io.shaka.http

import io.shaka.http.Status.OK

case class Response(status: Status = OK, headers: Headers = Headers.Empty, entity: Option[Entity] = None)<commit_msg>Added convenience/builder methods to Response<commit_after>package io.shaka.http

import io.shaka.http.Status.OK
import io.shaka.http.HttpHeader.CONTENT_TYPE

case class Response(status: Status = OK, headers: Headers = Headers.Empty, entity: Option[Entity] = None){

  def entity(content: String) = copy(entity = Some(Entity(content)))

  def header(header: HttpHeader, value: String) = copy(headers = (header, value) :: headers)

  def contentType(value: String) = header(CONTENT_TYPE, value)

  def contentType(value: ContentType) = header(CONTENT_TYPE, value.value)
}
{'fraction_non_alphanumeric': 0.1202113606340819, 'fraction_numerical': 0.0, 'mean_word_length': 5.954128440366972, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3510086', 'n_tokens_mistral': 237, 'n_tokens_neox': 231, 'n_words': 59}