Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

135
Views
Send a POST request to initiate FLASK function

I am trying to initiate a POST request in javascript/jquery so that FLASK can carry out its function of processing and uploading user input data in form.

#CATALOG
@app.route("/catalog", methods=["POST","GET"])
def catalog():
    if request.method =="POST":
           #function loads form data to mongodb with processing

This is my javascript main.js

$(document).ready(function(){
    //On Submit
    $("#form").on('submit',function(e){
        e.preventDefault();
        $.ajax({
            type:'POST', url:'/catalog',
            success: function(years){
                console.log("Form data loaded to mongodb")}
            });

Is it possible to initiate a POST method via javascript with out refreshing the page?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!