Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8654975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:55:10+00:00 2026-06-12T14:55:10+00:00

here is the jquery $.ajax({ type: POST, url: /posthere, dataType: json, data: {myDict:{‘1′:’1’, ‘2’:’2′}},

  • 0

here is the jquery

$.ajax({
    type: "POST",
    url: "/posthere",
    dataType: "json",
    data: {myDict:{'1':'1', '2':'2'}},
    success: function(data){
        //do code
    }
});

Here is the python

@route("/posthere", method="POST")
def postResource(myDict):
    #do code
    return "something"

It looks like the the url formats on support int, float, path, and re… am I missing something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:55:11+00:00Added an answer on June 12, 2026 at 2:55 pm

    There are only bytes on the wire. To send an object you need to serialize it using some data format e.g., json:

    $.ajax({
        type: "POST",
        url: "/posthere",
        data: JSON.stringify({myDict: {'1':'1', '2':'2'}}),
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(data){
            alert(data);
        },
        failure: function(err) {
            alert(err);
        }
    });
    

    On the receiving end you need to parse json text into Python object:

    from bottle import request, route
    
    @route("/posthere", method="POST")
    def postResource():
        #do code
        myDict = request.json['myDict']
        return {"result": "something"}
    

    Returned dictionaries are automatically converted to json.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my client-side jQuery code: $.ajaxSetup ({ contentType: application/json, datatype: 'json' }); $.ajax({ type:
I have a jQuery .ajax call: $j.ajax({ type: POST, url: /Services/Cart.asmx/UpdateQuantity, data: data, contentType:
$.ajax({ type: POST, url: some.php, data: name=John&location=Boston, success: function(msg){ alert( Data Saved: + msg
With the following code: $('#langHref').html(Translating...).css(color,#FF9933); jQuery.ajax({ type: post , url: someUrl , data: {
Here's an example taken from http://docs.jquery.com/API/1.1/AJAX#.24.post.28_url.2C_params.2C_callback_.29 $.ajax({ type: POST, url: some.php, data: name=John&location=Boston, success:
I am using ASP.NET page methods with jQuery. Here is my code, $.ajax({ type:
Within a jQuery ajax function data supplied to the callback function on success is
Hello i got a question about jQuery ajax post request in ZendFramework here is
I am using JQUERY ajax to call an MVC method: JQUERY: $.ajax({ type: POST,
I am using jQuery.ajax(...) to retrieve JSON data from an ASP.NET MVC service. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.