Why am I getting a response from the wrong API endpoint?Why is reading lines from stdin much slower in C++ than Python?Get unique values from a list in pythonReturn JSON response from Flask viewGet list from pandas DataFrame column headersTwitter oauth with flask_oauthlib, Failed to generate request tokenFlask with mod_wsgi - Cannot call my modulesFlask POSTs with Trailing SlashCan't access flask app from dedicated ip address from 80 port using apacheCan't make Restplus Flask API run using uWSGIHow can I run an app script python in django (hosted in a2hosting)?
What would happen if the UK refused to take part in EU Parliamentary elections?
Is HostGator storing my password in plaintext?
How will losing mobility of one hand affect my career as a programmer?
The plural of 'stomach"
Should my PhD thesis be submitted under my legal name?
What't the meaning of this extra silence?
Go Pregnant or Go Home
Where in the Bible does the greeting ("Dominus Vobiscum") used at Mass come from?
Is the destination of a commercial flight important for the pilot?
How does residential electricity work?
Is there any reason not to eat food that's been dropped on the surface of the moon?
Can a monster with multiattack use this ability if they are missing a limb?
Dot above capital letter not centred
Your magic is very sketchy
Valid Badminton Score?
What are the ramifications of creating a homebrew world without an Astral Plane?
What is the oldest known work of fiction?
Hostile work environment after whistle-blowing on coworker and our boss. What do I do?
How do I define a right arrow with bar in LaTeX?
How do we know the LHC results are robust?
Time travel short story where a man arrives in the late 19th century in a time machine and then sends the machine back into the past
Is there a problem with hiding "forgot password" until it's needed?
Using parameter substitution on a Bash array
If you attempt to grapple an opponent that you are hidden from, do they roll at disadvantage?
Why am I getting a response from the wrong API endpoint?
Why is reading lines from stdin much slower in C++ than Python?Get unique values from a list in pythonReturn JSON response from Flask viewGet list from pandas DataFrame column headersTwitter oauth with flask_oauthlib, Failed to generate request tokenFlask with mod_wsgi - Cannot call my modulesFlask POSTs with Trailing SlashCan't access flask app from dedicated ip address from 80 port using apacheCan't make Restplus Flask API run using uWSGIHow can I run an app script python in django (hosted in a2hosting)?
I am following this tutorial initially I was trying to get a response using postman with the url
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com/:8080
but it would not return a response, so then I tried without the /
at the end and it returned what I wanted, why is this happening as my flask route clearly has a /
in it
My flask app looks like this
from flask import Flask
application = Flask(__name__)
@application.route("/")
def hello():
return "<h1 style='color:blue'>Hello There!</h1>"
if __name__ == '__main__':
application.run(host="0.0.0.0", port="8080")
python flask
add a comment |
I am following this tutorial initially I was trying to get a response using postman with the url
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com/:8080
but it would not return a response, so then I tried without the /
at the end and it returned what I wanted, why is this happening as my flask route clearly has a /
in it
My flask app looks like this
from flask import Flask
application = Flask(__name__)
@application.route("/")
def hello():
return "<h1 style='color:blue'>Hello There!</h1>"
if __name__ == '__main__':
application.run(host="0.0.0.0", port="8080")
python flask
add a comment |
I am following this tutorial initially I was trying to get a response using postman with the url
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com/:8080
but it would not return a response, so then I tried without the /
at the end and it returned what I wanted, why is this happening as my flask route clearly has a /
in it
My flask app looks like this
from flask import Flask
application = Flask(__name__)
@application.route("/")
def hello():
return "<h1 style='color:blue'>Hello There!</h1>"
if __name__ == '__main__':
application.run(host="0.0.0.0", port="8080")
python flask
I am following this tutorial initially I was trying to get a response using postman with the url
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com/:8080
but it would not return a response, so then I tried without the /
at the end and it returned what I wanted, why is this happening as my flask route clearly has a /
in it
My flask app looks like this
from flask import Flask
application = Flask(__name__)
@application.route("/")
def hello():
return "<h1 style='color:blue'>Hello There!</h1>"
if __name__ == '__main__':
application.run(host="0.0.0.0", port="8080")
python flask
python flask
asked Mar 21 at 15:26
Connor McCannConnor McCann
947
947
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
The order of the parts of a URL is important.
The URL
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com/:8080
Is going to attempt port 80, and look for a path /:8080
.
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com:8080/
Will attempt port 8080 and look for a path /
add a comment |
There are two different concepts that you are getting mixed up on here.
The line @application.route("/")
defines the root of your site. That is the default entry point or path if you enter your site address in a browser without e.g /about
at the end.
The address ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com:8080
is a combination of the web server address and port, separated by a colon. You will not get a response if you alter this address. You could add a "/" after the 8080 to get to a particular page.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55283892%2fwhy-am-i-getting-a-response-from-the-wrong-api-endpoint%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The order of the parts of a URL is important.
The URL
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com/:8080
Is going to attempt port 80, and look for a path /:8080
.
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com:8080/
Will attempt port 8080 and look for a path /
add a comment |
The order of the parts of a URL is important.
The URL
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com/:8080
Is going to attempt port 80, and look for a path /:8080
.
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com:8080/
Will attempt port 8080 and look for a path /
add a comment |
The order of the parts of a URL is important.
The URL
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com/:8080
Is going to attempt port 80, and look for a path /:8080
.
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com:8080/
Will attempt port 8080 and look for a path /
The order of the parts of a URL is important.
The URL
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com/:8080
Is going to attempt port 80, and look for a path /:8080
.
ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com:8080/
Will attempt port 8080 and look for a path /
edited Mar 21 at 15:46
answered Mar 21 at 15:31
Ian McLairdIan McLaird
4,96021630
4,96021630
add a comment |
add a comment |
There are two different concepts that you are getting mixed up on here.
The line @application.route("/")
defines the root of your site. That is the default entry point or path if you enter your site address in a browser without e.g /about
at the end.
The address ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com:8080
is a combination of the web server address and port, separated by a colon. You will not get a response if you alter this address. You could add a "/" after the 8080 to get to a particular page.
add a comment |
There are two different concepts that you are getting mixed up on here.
The line @application.route("/")
defines the root of your site. That is the default entry point or path if you enter your site address in a browser without e.g /about
at the end.
The address ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com:8080
is a combination of the web server address and port, separated by a colon. You will not get a response if you alter this address. You could add a "/" after the 8080 to get to a particular page.
add a comment |
There are two different concepts that you are getting mixed up on here.
The line @application.route("/")
defines the root of your site. That is the default entry point or path if you enter your site address in a browser without e.g /about
at the end.
The address ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com:8080
is a combination of the web server address and port, separated by a colon. You will not get a response if you alter this address. You could add a "/" after the 8080 to get to a particular page.
There are two different concepts that you are getting mixed up on here.
The line @application.route("/")
defines the root of your site. That is the default entry point or path if you enter your site address in a browser without e.g /about
at the end.
The address ec2-x-x-xxx-xx.eu-west-2.compute.amazonaws.com:8080
is a combination of the web server address and port, separated by a colon. You will not get a response if you alter this address. You could add a "/" after the 8080 to get to a particular page.
answered Mar 21 at 15:32
NickNick
1,10911634
1,10911634
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55283892%2fwhy-am-i-getting-a-response-from-the-wrong-api-endpoint%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown