<commit_before>package com.ofg.twitter.place.extractor

import com.ofg.infrastructure.web.resttemplate.fluent.ServiceRestClient
import com.ofg.twitter.config.Collaborators
import groovy.transform.CompileStatic

@CompileStatic
class ColleratorClient {

    private final ServiceRestClient serviceRestClient

    ColleratorClient(ServiceRestClient serviceRestClient) {
        this.serviceRestClient = serviceRestClient
    }

    void populatePlaces(long pairId, String places) {
        serviceRestClient.forService(Collaborators.COLLERATOR_DEPENDENCY_NAME)
                .post()
                .onUrl("/$pairId")
                .body(places)
                .anObject()
                .ofType(String)
    }
<commit_msg>Using path variables is more idiomatic and works better with metrics<commit_after>package com.ofg.twitter.place.extractor

import com.ofg.infrastructure.web.resttemplate.fluent.ServiceRestClient
import com.ofg.twitter.config.Collaborators
import groovy.transform.CompileStatic

@CompileStatic
class ColleratorClient {

    private final ServiceRestClient serviceRestClient

    ColleratorClient(ServiceRestClient serviceRestClient) {
        this.serviceRestClient = serviceRestClient
    }

    void populatePlaces(long pairId, String places) {
        serviceRestClient.forService(Collaborators.COLLERATOR_DEPENDENCY_NAME)
                .post()
                .onUrlFromTemplate("/{pairId}").withVariables(pairId)
                .body(places)
                .anObject()
                .ofType(String)
    }

{'fraction_non_alphanumeric': 0.07402597402597402, 'fraction_numerical': 0.0, 'mean_word_length': 3.098404255319149, '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': '3836734', 'n_tokens_mistral': 440, 'n_tokens_neox': 412, 'n_words': 70}