Title: How can I send data using POST method?
Last modified: December 20, 2019

---

# How can I send data using POST method?

 *  Resolved [richardlm57](https://wordpress.org/support/users/richardlm57/)
 * (@richardlm57)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/how-can-i-send-data-using-post-method/)
 * Hello. I have a question because you mention this in the plugin FAQ: “Always 
   use POST method and not GET to submit data, following url examples are only for
   demonstration purposes” but I’m trying it with the API and if I don’t set the
   parameters in URL, I’m getting an error. How can I pass these parameters with
   POST?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Ali Qureshi](https://wordpress.org/support/users/parorrey/)
 * (@parorrey)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/how-can-i-send-data-using-post-method/#post-12262782)
 * You can use send data using POST method with jQuery or js or any standard form.
 * Please check a jQuery POST call example here.
 * [https://guide.freecodecamp.org/jquery/jquery-ajax-post-method/](https://guide.freecodecamp.org/jquery/jquery-ajax-post-method/)
 *     ```
       <script>
       // Attach a submit handler to the form
       $( "#userForm" ).submit(function( event ) {
   
         // Stop form from submitting normally
         event.preventDefault();
   
         // Get some values from elements on the page:
         var $form = $( this ),
           user_id = $form.find( "input[name='user_id']" ).val(),
           url = "https://www.domain.com/api/user/get_avatar/?user_id="+user_id+"&type=thumb";
   
   
         // Send the data using post
         var posting = $.post( url, { s: term } );
   
         //Ajax Function to send a get request
         $.ajax({
           type: "POST",
           url: url,
           dataType:"jsonp"
           success: function(response){
               //if request if made successfully then the response represent the data
   
               $( "#result" ).empty().append( response );
           }
         });
   
       });
       </script>
       ```
   
 * You can also use POSTMAN to send test REST API calls [https://www.getpostman.com/downloads/](https://www.getpostman.com/downloads/)
 * or you can also use Advanced REST Client Extension for test api calls [https://chrome.google.com/webstore/detail/advanced-rest-client/](https://chrome.google.com/webstore/detail/advanced-rest-client/)
    -  This reply was modified 6 years, 5 months ago by [Ali Qureshi](https://wordpress.org/support/users/parorrey/).
 *  Thread Starter [richardlm57](https://wordpress.org/support/users/richardlm57/)
 * (@richardlm57)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/how-can-i-send-data-using-post-method/#post-12265603)
 * I was (and I’m still) trying with Postman but always I’m getting this error: “
   You must include ‘username’ var in your request. “; this is happening when I 
   try to test the “register” method. Also I’m sending the “insecure” parameter 
   via GET because I’m testing in a local environment, I don’t know if it affects
   what I send with POST

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How can I send data using POST method?’ is closed to new replies.

 * ![](https://ps.w.org/json-api-user/assets/icon-256x256.png?rev=1965790)
 * [JSON API User](https://wordpress.org/plugins/json-api-user/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-api-user/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-api-user/)
 * [Active Topics](https://wordpress.org/support/plugin/json-api-user/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-api-user/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-api-user/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [richardlm57](https://wordpress.org/support/users/richardlm57/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/how-can-i-send-data-using-post-method/#post-12265603)
 * Status: resolved