Giter VIP home page Giter VIP logo

sm-httpreq's People

Contributors

clugg avatar nikooo777 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

sm-httpreq's Issues

Freezing on socket connecting.

Hello, I'm somewhat new to pawn and I'm trying to contact my api using the following code:

public void OnPluginStart()
{
  RegAdminCmd("sm_api_register", Command_Register, ADMFLAG_SLAY);
}

public Action Command_Register(int client, int args)
{
    PrintToServer("Requesting match ID from project nun");
    HTTPRequest req = HTTPRequest("GET", "http://projectnun.azurewebsites.net/api/heartbeat/register", "OnRequestComplete");
    req.debug = true;
    req.headers.SetString("User-Agent", "HTTPRequests for SourceMod");
    req.SendRequest();
}

public void OnRequestComplete(bool bSuccess, int iStatusCode, StringMap tHeaders, const char[] sBody, int iErrorType, int iErrorNum, any data)
{
        PrintToServer("Received");
}

however it'll never receive anything, the last thing on the output console is :

sm_api_register
Requesting match ID from project nun
httpreq::HTTPRequest 0 socket connecting to projectnun.azurewebsites.net:80

and it stays still. Am I missing something or is it really a bug ?

Anyway thanks for your attention and congratulations on your work so far

HTTPS requests

Changing over to SSL by simply updating the URL to include https did not work.

Looking through you includes, and quite possibly do a pull request with the required code to do an SSL secure HTTP request.

If you can add this, would be great. Otherwise I'm sure I'll figure it out eventually.

If I'm missing something and this is supported, please let me know.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.