Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.kirgor.enklib.rest;
 
 import java.util.Map;

Represents response to request.
 
 public class Response {
     private int code;
    private Map<StringStringheaders;

    
Creates Response instance.

Parameters:
code HTTP response code.
headers Map of HTTP response headers.
    public Response(int codeMap<StringStringheaders) {
        this. = code;
        this. = headers;
    }

    
Gets HTTP response code.
    public int getCode() {
        return ;
    }

    
Gets map of HTTP response headers.
    public Map<StringStringgetHeaders() {
        return ;
    }

    
Gets HTTP response header value.

Parameters:
name Header name.
Returns:
Header value or null.
    public String getHeaderValue(String name) {
        if ( == null) {
            return null;
        }
        return .get(name);
    }
New to GrepCode? Check out our FAQ X