I'm trying to learn why a server does not create a second thread for the second request:
from flask import render_template, redirect, url_for, jsonify
from . import pm
from .forms import NewForm
import requests, json
@pm.route('/pm/index')
def index():
    return render_template('pm/index.html')
@pm.route('/pm/new', methods=['GET', 'POST'])
def newitem():
    form = NewForm()
    if form.validate_on_submit():
        url = 'http://127.0.0.1:5000/api/search'
        payload = {'some': 'data'}
        r = requests.get(url)
        print(r.status_code)
        return redirect(url_for('material.index'))
    return render_template('pm/new.html', form=form)
I have an external API that I would like to POST information to, after a user POSTs to @pm.newitem
To facilitate development, The endpoint is stubbed to hit a endpoint on my local server but it just hangs forever. Why is this the case, if the endpoint is responsive when I test it manually?
this http://127.0.0.1:5000/api/search responds with that:
{
  "results": [
    {
      "id": 1,
      "name": "record"
    },
    {
      "id": 2,
      "name": "record2"
    }
  ]
}
Note, if I run two instances of the server and point the request to port 3000, it works.