<commit_before><?php
/**
 * A thin wrapper around Zend_Http_Client to handle communication with a given plugin
 *
 * @author jason
 */
class Models_Plugin extends Zend_Http_Client {
    private $name;
    private $artifactIds;

    public function getName() {
        return $this->name;
    }
    public function setName($name) {
        $this->name = $name;
    }
    public function setArtifactIds(stdClass $artifactIds) {
        $this->artifactIds = $artifactIds;
    }
    public function fetchData(){
        if (!isset($this->artifactIds)){
            throw new Exception("There are no artifact IDs loaded to send the Source API.");
        }
        parent::setRawData(json_encode($this->artifactIds), 'text/json');
        return parent::request("POST");

    }




}
?><commit_msg>change to GET request to plugins for now to help with debugging<commit_after><?php

/**
 * A thin wrapper around Zend_Http_Client to handle communication with a given plugin
 *
 * @author jason
 */
class Models_Plugin extends Zend_Http_Client {
    private $name;
    private $artifactIds;

    public function getName() {
        return $this->name;
    }
    public function setName($name) {
        $this->name = $name;
    }

    public function setArtifactIds(stdClass $artifactIds) {
        $this->artifactIds = $artifactIds;
    }
    public function fetchData(){
        if (!isset($this->artifactIds)){
            throw new Exception("There are no artifact IDs loaded to send the Source API.");
        }
		
        #Change request to GET with a parameter key for now to help with debugging.  Later change to a POST with param key.
        parent::setParameterGet("query", json_encode($this->artifactIds));
        return parent::request("GET");
    }


}
?>
{'fraction_non_alphanumeric': 0.10669693530079455, 'fraction_numerical': 0.0, 'mean_word_length': 2.866228070175439, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '183765', 'n_tokens_mistral': 504, 'n_tokens_neox': 470, 'n_words': 155}