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

us.abstracta.jmeter.javadsl.bridge.serialization.constructs.HttpHeadersConstruct Maven / Gradle / Ivy

Go to download

Module which allows to build simple adapters for JMeter Java DSL in other languages

The newest version!
package us.abstracta.jmeter.javadsl.bridge.serialization.constructs;

import java.util.Map;
import org.yaml.snakeyaml.nodes.Node;
import org.yaml.snakeyaml.nodes.ScalarNode;
import us.abstracta.jmeter.javadsl.http.HttpHeaders;

public class HttpHeadersConstruct extends BaseBridgedObjectConstruct {

  @Override
  public Object construct(Node node) {
    Map properties = getNodeProperties(node, "httpHeaders");
    HttpHeaders ret = new HttpHeaders();
    properties.forEach((key, value) -> ret.header(key, ((ScalarNode) value).getValue()));
    return ret;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy