<commit_before><?php

namespace phpcouch\http;

class HttpRequest extends HttpMessage
{
	const METHOD_DELETE = 'DELETE';
	const METHOD_GET = 'GET';
	const METHOD_POST = 'POST';
	const METHOD_PUT = 'PUT';
	
	protected $destination;
	
	public function __construct($destination, $method = self::METHOD_GET)
	{
		$this->setDestination($destination);
		$this->setMethod($method);
	}
	
	public function getDestination()
	{
		return $this->destination;
	}
	
	public function getMethod()
	{
		return $this->method;
	}
	
	public function setDestination($destination)
	{
		$this->destination = $destination;<commit_msg>make destination optional in HttpRequest ctor<commit_after><?php

namespace phpcouch\http;

class HttpRequest extends HttpMessage
{
	const METHOD_DELETE = 'DELETE';
	const METHOD_GET = 'GET';
	const METHOD_POST = 'POST';
	const METHOD_PUT = 'PUT';
	
	protected $destination;
	
	public function __construct($destination = null, $method = self::METHOD_GET)
	{
		if($destination) {
			$this->setDestination($destination);
		}
		$this->setMethod($method);
	}
	
	public function getDestination()
	{
		return $this->destination;
	}
	
	public function getMethod()
	{
		return $this->method;
	}
	
	public function setDestination($destination)
	{
		$this->destination = $destination;
{'fraction_non_alphanumeric': 0.12314886983632112, 'fraction_numerical': 0.0, 'mean_word_length': 4.944444444444445, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '2866421', 'n_tokens_mistral': 433, 'n_tokens_neox': 390, 'n_words': 92}