com.clouway.oauth2.http.RsText Maven / Gradle / Ivy
package com.clouway.oauth2.http;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.util.Collections;
import java.util.Map;
/**
* @author Miroslav Genov ([email protected])
*/
public class RsText implements Response {
private final String body;
public RsText(String body) {
this.body = body;
}
@Override
public Status status() {
return new Status(HttpURLConnection.HTTP_OK);
}
@Override
public Map header() throws IOException {
return Collections.emptyMap();
}
@Override
public InputStream body() throws IOException {
return new ByteArrayInputStream(body.getBytes());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy