All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.appland.appmap.output.v1.HttpServerResponse Maven / Gradle / Ivy

package com.appland.appmap.output.v1;

import java.util.Map;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * Represents a snapshot of an HTTP server response sent at runtime. Embedded within an
 * {@link Event}.
 * @see Event
 * @see GitHub: AppMap - HTTP server response   attributes
 */
public class HttpServerResponse {
  public Integer status;

  @JSONField
  public Map headers;

  /**
   * Record the status of an HTTP response.
   * @param status The response status returned
   * @return {@code this}
   * @see GitHub: AppMap - HTTP server response attributes
   */
  public HttpServerResponse setStatus(final Integer status) {
    this.status = status;
    return this;
  }

  /**
   * Record the headers of an HTTP response.
   * @param headers The headers to set
   * @return {@code this}
   * @see GitHub: AppMap - HTTP server response attributes
   */
  public HttpServerResponse setHeaders(final Map headers) {
    this.headers = headers;
    return this;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy