<commit_before>package de.fu_berlin.cdv.chasingpictures.api;

import android.content.Context;

import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;

/**
 * Abstract class for API requests.
 * @author <NAME>
 */
public abstract class ApiRequest<T> {
    protected final ApiUtil apiUtil;
    protected final String apiUri;
    protected final RestTemplate restTemplate;

    protected ApiRequest(Context context, int endpointResID) {
        this.apiUtil = new ApiUtil(context);
        this.apiUri = apiUtil.getURIforEndpoint(endpointResID);
        this.restTemplate = ApiUtil.buildJsonRestTemplate();
    }

    public abstract ResponseEntity<T> send();
}<commit_msg>Make the ApiRequest save the current context.<commit_after>package de.fu_berlin.cdv.chasingpictures.api;

import android.content.Context;

import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;

/**
 * Abstract class for API requests.
 * @author <NAME>
 */
public abstract class ApiRequest<T> {
    protected final ApiUtil apiUtil;
    protected final String apiUri;
    protected final RestTemplate restTemplate;
    protected final Context context;

    protected ApiRequest(Context context, int endpointResID) {
        this.context = context;
        this.apiUtil = new ApiUtil(context);
        this.apiUri = apiUtil.getURIforEndpoint(endpointResID);
        this.restTemplate = ApiUtil.buildJsonRestTemplate();
    }

    public abstract ResponseEntity<T> send();
}
{'fraction_non_alphanumeric': 0.08817766165904638, 'fraction_numerical': 0.0, 'mean_word_length': 4.175675675675675, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3232600', 'n_tokens_mistral': 417, 'n_tokens_neox': 420, 'n_words': 106}