Giter Site home page Giter Site logo

weapp-client-sdk's Introduction

微信小程序客户端腾讯云增强 SDK

会话管理服务

微信的网络请求接口 wx.request() 没有携带 Cookies,这让传统基于 Cookies 实现的会话管理不再适用。为了让处理微信小程序的服务能够识别会话,腾讯云推出的微信小程序客户端增强 SDK 支持会话管理服务。配合云端 SDK 使用,可以轻松集成安全的会话管理能力。

SDK 获取

本 SDK 已经发布为 bower 模块,可以直接安装到小程序目录中。

npm install bower -g
bower install qcloud-weapp-client-sdk

SDK 使用

客户端 SDK 的使用比较简单,提供了一个和 wx.request 参数一样的方法,使用该方法发起的请求会和服务端的 SDK 配合获得登录态。

var qcloud = require('./bower_components/qcloud-weapp-client-sdk/index.js');

qcloud.request({
    url: 'https://www.mydomain.com/myapi',
    success: function (data) {
        console.log(data);
    }
});

SDK 实现

长连接服务

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.