I want to use Spring cloud function with API Gateway and lambda.
I have been reading about lambda and spring cloud functions, is there anyway to get hold of query parameters in the lambda that are passed in via api gateway..im trying to follow the documentation
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Bean
public Function<String, String> uppercase() {
// get access to query params
return value -> value.toUpperCase();
}
}
previously there was a springbootapigatewayrequest handler that would give you access to the query parameters. But thats been replaced?
Can someone help ?
Yes, you can change function signature to public Function<Message<String>, String> uppercase()
and get everything from message headers (we copy everything there).
You can also change signature to Function<APIGatewayProxyRequestEvent, ...>