com.github.dreamhead.moco.extractor.HttpMethodExtractor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of moco-core Show documentation
Show all versions of moco-core Show documentation
Moco is an easy setup stub framework, mainly focusing on testing and integration.
package com.github.dreamhead.moco.extractor;
import com.github.dreamhead.moco.HttpRequest;
import com.github.dreamhead.moco.HttpRequestExtractor;
import com.google.common.base.Optional;
import static com.google.common.base.Optional.of;
public class HttpMethodExtractor extends HttpRequestExtractor {
@Override
protected Optional doExtract(final HttpRequest request) {
return of(request.getMethod().toUpperCase());
}
}