Unlock instant, AI-driven research and patent intelligence for your innovation.

Network request response method and device, computer equipment and storage medium

A technology for computer equipment and network requests, applied in the fields of computer equipment and computer-readable storage media, response methods, and response devices for network requests, and can solve the problems that the protobuf protocol format is difficult to apply and return response results.

Inactive Publication Date: 2021-06-11
PING AN TECH (SHENZHEN) CO LTD
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The main purpose of this application is to provide a method for responding to network requests, a device for responding to network requests, computer equipment, and computer-readable storage media, aiming to solve the problem that the protobuf protocol format is difficult to apply to returning the response results corresponding to network requests based on the Flutter language The problem

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Network request response method and device, computer equipment and storage medium
  • Network request response method and device, computer equipment and storage medium
  • Network request response method and device, computer equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0042] In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.

[0043] refer to figure 1 , in an embodiment, the response method of the network request includes:

[0044] Step S10, when receiving a network request based on the Flutter language, obtain response data corresponding to the network request;

[0045] Step S20: When it is detected that the response data is obtained successfully, it is detected whether the content-type type in the request header of the pre-check request corresponding to the network request has been set to a preset type, wherein the preset type is used for replace json type;

[0046] Step S30, if it is detec...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a data transmission optimization technology, and discloses a network request response method. The method comprises the following steps: when a Flutter language-based network request is received, obtaining response data corresponding to the network request; detecting whether a content-type type in a request header of a pre-check request corresponding to the network request is set as a preset type or not, wherein the preset type is used for replacing a json type; if yes, intercepting response data corresponding to the network request; converting the response data into byte stream data; converting the byte stream data into a protobuf object; and generating a response result based on the protobuf object. The invention further relates to the technical field of block chains. The invention further discloses a network request response device, computer equipment and a computer readable storage medium. According to the application, the protobuf protocol format can be applied to return the response result corresponding to the network request based on the Flutter language.

Description

technical field [0001] The present application relates to the technical field of data transmission optimization, and in particular to a method for responding to a network request, a device for responding to a network request, computer equipment, and a computer-readable storage medium. Background technique [0002] The protobuf protocol format has the advantages of fast speed and good performance, so more and more software developers prefer to use the protobuf protocol format to return network results. The Flutter language has developed faster and faster in recent years because of its cross-platform and near-native performance and experience. Now the mainstream network requests based on the Flutter language on the market basically use the third-party open source library dio to make network requests, but the library It does not support the analysis of the protobuf protocol format, and the returned result is the Response type, which has the defect that the protobuf format canno...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/06
CPCH04L63/10H04L63/306H04L69/08H04L69/22
Inventor 周浩
Owner PING AN TECH (SHENZHEN) CO LTD