0

When I call my AWS API Gateway from a JavaScript client I get a 404 not found error because the SDK invokes the wrong endpoint:

Instead of

It was fine yesterday. Someone can explain the cause?

UPDATE!

In axios.standalone.js a Microsoft.XMLHTTP ActiveX object is created to send the request. The data parameter has a url member set to "https:abc123.execute-api.us-east-1.amazonaws.com/dev/status". Note there is no slash slash at the beginning. The base URL of the JavaScript client is inserted into the request URL. Please help!

1
  • My JavaScript client resides on my server (for example myserver.com) Commented Nov 26, 2015 at 5:19

2 Answers 2

1

There was an issue with the JS SDK generator that has been fixed recently. Please update your JS SDK with a newly generated version.

Best, Jurgen

Sign up to request clarification or add additional context in comments.

Comments

0

Modify axios.standalone.js

module.exports = function xhrAdapter(resolve, reject, config) { // Temporary fix for missing // in config.url if ((config.url.substr(0, 6) == "https:") && (config.url.substr(0, 8) != "https://")) { config.url = "https://" + config.url.substr(6, config.url.length - 6); } ...

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.