com.github.dreamhead.moco.parser.model.BaseActionSetting Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moco-runner Show documentation
Show all versions of moco-runner Show documentation
Moco is an easy setup stub framework, mainly focusing on testing and integration.
package com.github.dreamhead.moco.parser.model;
import com.github.dreamhead.moco.HttpHeader;
import java.util.Map;
import static com.github.dreamhead.moco.Moco.header;
public abstract class BaseActionSetting {
protected final HttpHeader[] asHeaders(final Map headers) {
if (headers == null) {
return new HttpHeader[0];
}
return headers.entrySet().stream()
.map(input -> header(input.getKey(), input.getValue().asResource()))
.toArray(HttpHeader[]::new);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy