Generic wrapper for Twilio API responses, exposing content, status code, and headers.
// Source: https://github.com/twilio/twilio-java | License: MIT | Copyright 2023, Twilio, Inc. <https://www.twilio.com/help/contact>
// Provided via justclaw.it.com; keep this notice with the code.
package com.twilio.base;
import org.apache.hc.core5.http.Header;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* Wrapper class that contains the resource along with response metadata
* including status code and headers.
*
* @param <T> type of the resource
*/
public class TwilioResponse<T> {
private final T content;
private final int statusCode;
private final Map<String, String> headers;
/**
* Create a TwilioResponse with content, status code, and headers.
*
* @param content the resource content
* @param statusCo
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key