I am rewriting an application using serverless. For legacy reasons I need to access an endpoint using http rather than https. Right now when I try to use http I get a redirect to https rather than the data I need. How I can setup an http endpiont rather than an https one?
Currently tis is the response I get with http
http get http://9lu88q2p7i.execute-api.us-east-1.amazonaws.com/staging/test
HTTP/1.1 301 Moved Permanently
Connection: keep-alive
Content-Length: 183
Content-Type: text/html
Date: Tue, 16 Jan 2018 09:31:51 GMT
Location: https://9lu88q2p7i.execute-api.us-east-1.amazonaws.com/staging/test
Server: CloudFront
Via: 1.1 861b49a34b383ce3ac4ea8b7117b8953.cloudfront.net (CloudFront)
X-Amz-Cf-Id: ChUFZEU_3HnRNB-dTYvZPtly0QiPgppSFE1t5BaJ5YIiNwc1IC2CZg==
X-Cache: Redirect from cloudfront
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>CloudFront</center>
</body>
</html>
I want it to look like this https response
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 4
Content-Type: application/json
Date: Tue, 16 Jan 2018 09:38:17 GMT
Via: 1.1 b790a9f06b09414fec5d8b87e81d4b7f.cloudfront.net (CloudFront)
X-Amz-Cf-Id: CjdFFBHTBTROgY_-c08vgTmPOIo2Jj5QPF6ihKHNkKB8on8q5YUIVA==
X-Amzn-Trace-Id: sampled=0;root=1-5a5dc809-33b5ff3672e71b5c73dd3bfb
X-Cache: Miss from cloudfront
x-amzn-RequestId: fb4d54ce-faa0-11e7-bc24-b37f137d756a
data