<commit_before>import httplib2
from restservice.RestServiceInterface import RestServiceInterface


class ServiceDefinition(RestServiceInterface):
    id = u'json'

    def send(self, url, instance):
        info = {"id_string": instance.xform.id_string, "uuid": instance.uuid}
        valid_url = url % info
        http = httplib2.Http()
        resp, content = http.request(valid_url, 'GET')
<commit_msg>cleaning up json<commit_after>import httplib2
from restservice.RestServiceInterface import RestServiceInterface
import json

class ServiceDefinition(RestServiceInterface):
    id = u'json'

    def send(self, url, instance):
        post_data = dumps(instance.xform.id_string)
        headers = {"Content-Type": "application/json"}
        http = httplib2.Http()
        resp, content = http.request(uri=url, method='POST',headers=headers
                                     body=post_data)
        

{'fraction_non_alphanumeric': 0.09812568908489526, 'fraction_numerical': 0.004410143329658214, 'mean_word_length': 3.2429906542056073, 'pattern_counts': {'":': 3, '<': 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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '112377', 'n_tokens_mistral': 258, 'n_tokens_neox': 253, 'n_words': 58}