HttpResponse Class

  • java.lang.Object
    • com.microsoft.aad.msal4j.HttpResponse

Implements

public class HttpResponse
implements IHttpResponse

HTTP response

Constructor Summary

Constructor Description
HttpResponse()

Method Summary

Modifier and Type Method and Description
void addHeaders(Map<String,List<String>> responseHeaders)
java.lang.String body()

HTTP response body

HttpResponse body(String body)

HTTP response body

java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers()

HTTP response headers

int statusCode()

HTTP response status code

HttpResponse statusCode(int statusCode)

HTTP response status code

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

HttpResponse

public HttpResponse()

Method Details

addHeaders

public void addHeaders(Map<>> responseHeaders)

Parameters:

responseHeaders - Map of HTTP headers returned from HTTP client

body

public String body()

HTTP response body

body

public HttpResponse body(String body)

HTTP response body

Parameters:

body

Returns:

this

headers

public Map<>> headers()

HTTP response headers

statusCode

public int statusCode()

HTTP response status code

statusCode

public HttpResponse statusCode(int statusCode)

HTTP response status code

Parameters:

statusCode

Returns:

this

Applies to