Giter Club home page Giter Club logo

offline_request's Introduction

Offline_request

Introduction

As we send a server a request, chances are some connection errors occur. This module can help you store sending data in a json file format first if you encounter some connection problems. After problems solved, you can activate this module again, and all the sending data stored in json file will be sent out.

How to use?

Step1: Creating url and sending data

Example:

url = 'http://127.0.0.1:5062'
data = {'service': 'business', 'operation': 'get_main_data'}

Step2: Defining a sending object

Example:

test = Send_obj(url, data)

Step3: Call the method "send" and choose sending type

Example:

get = test.send('get')   # you can choose 'get' or 'post'

Note:

If sending data have been stored in a json file and you want to send a server only past requests, you can insert the only_past in the method "send".

get2 = test.send('get', only_past=True)

offline_request's People

Contributors

zenith3092 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.