• Resolved danif10

    (@danif10)


    Hi, I am trying to create a ticket when a button is clicked.

    I am using AJAX by calling a function that contains the following line of code:

    $request=wp_remote_post(‘http://starcatalogo.com/wp-json/wpas-api/v1/tickets’, array(‘status’ => ‘publish’, ‘title’ => ‘test’, ‘content’ => ‘test’));

    $http_code = wp_remote_retrieve_response_code( $request);

    edit: the url above is without the ‘&#8217’, I do not know why this number appears when publishing the comment.

    However, no new tickets are created. When retrieving the http code the result is 400

    I would deeply aprreciate your help.

    • This topic was modified 5 years, 10 months ago by danif10.
    • This topic was modified 5 years, 10 months ago by danif10.
    • This topic was modified 5 years, 10 months ago by danif10.
    • This topic was modified 5 years, 10 months ago by danif10.
    • This topic was modified 5 years, 10 months ago by danif10.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Create a ticket with REST API’ is closed to new replies.