use of com.dtflys.forest.reflection.MetaRequest in project forest by dromara.
the class OptionsRequestLifeCycle method onMethodInitialized.
@Override
public void onMethodInitialized(ForestMethod method, Annotation annotation) {
MetaRequest metaRequest = createMetaRequest(annotation);
metaRequest.setType(ForestRequestType.OPTIONS.getName());
method.setMetaRequest(metaRequest);
}
use of com.dtflys.forest.reflection.MetaRequest in project forest by dromara.
the class PatchRequestLifeCycle method onMethodInitialized.
@Override
public void onMethodInitialized(ForestMethod method, Annotation annotation) {
MetaRequest metaRequest = createMetaRequest(annotation);
metaRequest.setType(ForestRequestType.PATCH.getName());
method.setMetaRequest(metaRequest);
}
use of com.dtflys.forest.reflection.MetaRequest in project forest by dromara.
the class RequestLifeCycle method createMetaRequest.
protected MetaRequest createMetaRequest(Annotation annotation) {
MetaRequest metaRequest = new MetaRequest(annotation);
ReflectUtils.copyAnnotationAttributes(annotation, metaRequest);
return metaRequest;
}
use of com.dtflys.forest.reflection.MetaRequest in project forest by dromara.
the class RequestLifeCycle method onMethodInitialized.
@Override
public void onMethodInitialized(ForestMethod method, Annotation annotation) {
MetaRequest metaRequest = createMetaRequest(annotation);
method.setMetaRequest(metaRequest);
}
use of com.dtflys.forest.reflection.MetaRequest in project forest by dromara.
the class TestInterfaceProxyHandler method testBaseURL.
@Test
public void testBaseURL() {
ProxyFactory<LocalhostBaseURLClient> getClientProxyFactory = new ProxyFactory<>(configuration, LocalhostBaseURLClient.class);
InterfaceProxyHandler<LocalhostBaseURLClient> interfaceProxyHandler = new InterfaceProxyHandler(configuration, getClientProxyFactory, LocalhostBaseURLClient.class);
MetaRequest metaRequest = interfaceProxyHandler.getBaseMetaRequest();
assertEquals("http://localhost", metaRequest.getUrl());
}
Aggregations