package main

import (
	"context"
	"fmt"
	"github.com/abhi9560/GoLayer"
	"github.com/aws/aws-lambda-go/events"
	"github.com/aws/aws-lambda-go/lambda"
)

func handleRequest(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
	fmt.Printf("Processing request data for request %s.\n", request.RequestContext.RequestID)
	fmt.Printf("Body size = %d.\n", len(request.Body))
	ApiResponse := events.APIGatewayProxyResponse{}
	for key, value := range request.Headers {
		fmt.Printf("    %s: %s\n", key, value)
	}

	ApiResponse = events.APIGatewayProxyResponse{Body: request.Body, StatusCode: 200}
	return ApiResponse, nil
}

func main() {
	lambda.Start(index.WrapHandler(handleRequest))
}
