Method and equipment for uniform mapping of HTTP requests

A device and unified technology, applied in the computer field, can solve the problems of decreased development efficiency, no separation, redundant code development, etc., to achieve the effect of improving the reuse rate and simplifying the development difficulty

Active Publication Date: 2017-01-25
ALIBABA GRP HLDG LTD
View PDF5 Cites 19 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] When the backend of the existing JAVA (an object-oriented programming language that can write cross-platform application software) sends HTTP requests, different methods must be defined for invoking HTTP requests of different third-party applications according to different business logics. The logic inside is to assemble parameters and call the underlying HTTP common request method, which leads to code redundancy and duplication of development
Multiple URLs, ports, and configuration parameters for calling third parties will be defined in the code, resulting in the mixing of business logic code and request configuration parameter code, which is not well separated, and different developers continue to repeat according to the business Develop the basic code for accessing HTTP requests, resulting in a low code reuse rate and a decline in development efficiency

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
  • Method and equipment for uniform mapping of HTTP requests
  • Method and equipment for uniform mapping of HTTP requests
  • Method and equipment for uniform mapping of HTTP requests

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0074] The application will be described in further detail below in conjunction with the accompanying drawings.

[0075] figure 1 It shows a schematic flowchart of a method for uniformly mapping HTTP requests according to one aspect of the present application, and the method includes: step S11 , step S12 , step S13 and step S14 .

[0076] Wherein, the step S11 includes: obtaining a mapping file for accessing a third-party HTTP service, wherein the mapping file includes HTTP request configuration parameters and encapsulation path methods; the step S12 includes: obtaining a mapping file for accessing a third-party HTTP service The interface of the service and the dynamic proxy annotation of the interface, wherein the interface includes several interface methods, and the attributes of the interface methods correspond to the attributes of the encapsulation path method of the HTTP request one by one; the step S13 includes : generate a JAVA object according to the mapping file, and...

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 aims to provide a method and equipment for uniform mapping of HTTP requests. A configuration content is independent from a business logic content by obtaining a mapping file used for access to third party HTTP service, the mapping file corresponds to an interface, a corresponding JAVA object is generated according to the mapping file, a reflection proxy note corresponding to a corresponding interface is called according to the requests so as to generate a dynamic proxy object, when the HTTP requests are performed, the dynamic proxy object can process the requests by use of the JAVA object generated according to the mapping file, a method in HTTP request basis service is called, and the HTTP requests are completed, so that one-time development and multiple-time reuse of the mapping file are realized. Accordingly, HTTP request calling is realized under the conditions that the development difficulty is simplified and the reuse rate is improved.

Description

technical field [0001] The present application relates to the computer field, and in particular to a technique for uniformly mapping HTTP requests. Background technique [0002] Nowadays, many JAVA back-end applications need to call the interface of the third-party application through HTTP (HTTP, HyperText Transfer Protocol, network protocol), so the code written must have the URL (Uniform Resource Locator, Uniform Resource Locator) and port of the HTTP request. and passed configuration parameters. [0003] When the backend of the existing JAVA (an object-oriented programming language that can write cross-platform application software) sends HTTP requests, different methods must be defined for invoking HTTP requests of different third-party applications according to different business logics. The logic inside is to assemble parameters and call the underlying HTTP common request method, which leads to code redundancy and duplication of development. Multiple URLs, ports, and...

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): G06F9/44
CPCG06F9/44
Inventor 杨思枢
Owner ALIBABA GRP HLDG LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products