View Single Post
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 12-09-2020 , 08:50   Re: REST in Pawn 1.2 - HTTP client for JSON REST APIs (Updated 2020/09/13)
Reply With Quote #86

Quote:
Originally Posted by mr05je View Post
Hi, i have problem with SSL

Error: POST Error: Cert verify failed: BADCERT_NOT_TRUSTED

I'am trying to send request on localhost and idk how to fix this bug

Code:
JSONObject CreateJSONObject()
{
    JSONObject hJSONObject = new JSONObject();
    hJSONObject.SetString("steamId", "1");

    return hJSONObject;
}

public Action test(int client, int args)
{	
	
    JSONObject hJSONObject = CreateJSONObject();
    HTTPClient hHTTPClient = new HTTPClient("http://localhost:5000/Gang");
    
    hHTTPClient.Post("post", hJSONObject, OnHTTPResponse, 1);
}
P.S.:
I am bad at English, it is difficult for me because I live in Russia
I can't reproduce this, are you sure you are using http://? You should only need a valid SSL certificate when using https://.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline