Post works but not get

My server is handling post requests perfectly fine but my get requests are not working and giving a 308
Repl link:

@app.route('/status', methods=['GET'])
def get_status():
    # You can return some status information when a GET request is made
    return jsonify({'status': 'Server is running'}), 200

# Add a route for the root path
@app.route('/', methods=['GET'])
def root():
    return jsonify({'message': 'Welcome to the server!'}), 200

Are you trying to use 308 is a permanent redirect.


When i click on new tab it sends me to a website:

That would be expected, as that’s the new development URL, instead of

THe client also gives an error of Host not found

What client is saying that the dev url isn’t found?

My bad it is Host not specified:

    raise InvalidURL(e, request=request)
requests.exceptions.InvalidURL: No host specified.

That sounds like you’re not pasting the full URL, what are you providing it?

1 Like