POST: sending a post request in a url itself

前端 未结 7 1217
忘掉有多难
忘掉有多难 2020-12-24 12:46

I have been given a url .. www.abc.com/details and asked to send my name and phone number on this url using POST. They have told me to set the cont

7条回答
  •  执念已碎
    2020-12-24 12:57

    You can post data to a url with JavaScript & Jquery something like that:

    $.post("www.abc.com/details", {
        json_string: JSON.stringify({name:"John", phone number:"+410000000"})
    });
    

提交回复
热议问题