Code Monkey home page Code Monkey logo

http's Introduction

Netlinx HTTP lib

A minimal HTTP library for working with web services natively in NetLinx.

Usage

As there’s no blocking socket IO in NetLinx when you make a call to any of the request function (http_get, http_head, http_put, http_post, http_patch or http_delete) this will return you a unique ‘sequence number’.

When a response is received it will call back to a function http_response_received(..) which you implement in your code. This will contain 3 arguments: the sequence number, the full request object and a fully parsed response object ready for you to deal with as you like. If you’re not interested in response feel free to omit this, otherwise just pop in a #define HTTP_RESPONSE_CALLBACK - similar to the RMS SDK.

An error, when encountered, will callback to http_error(..) along with the sequence number, the target request host, the full request object and an error number. #define HTTP_ERROR_CALLBACK signifies you’re interested in dealing with these.

By default it can handle up to 10 parallel requests but if you’re really hammering it, or dealing with a slow connection / server this can be bumped up or down by changing HTTP_MAX_PARALLEL_REQUESTS.

Other info

This software is distributed under MIT license, so feel free to integrate it in your commercial products.

http's People

Contributors

kimburgess avatar

Watchers

 avatar

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.