Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for unified mapping of http requests

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

Active Publication Date: 2019-12-27
ALIBABA GRP HLDG LTD
View PDF5 Cites 0 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 device for unified mapping of http requests
  • Method and device for unified mapping of http requests
  • Method and device for unified 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

A method of collectively mapping a hypertext transfer protocol (HTTP) request and a device utilizing the same. The method comprises: separating configuration content from service logic content by acquiring a mapping file for accessing to a third party HTTP service; associating the mapping file with an interface; generating a JAVA object corresponding to the mapping file; generating, according to a reflection proxy annotation corresponding to the associated interface called by a request, a dynamic proxy object; when processing a HTTP request, processing, by the dynamic proxy object, according to the JAVA object generated by the mapping file, the request, calling, by the dynamic proxy object, a method in an HTTP request basic service, and completing, by the dynamic proxy object, the HTTP request. As a result, the mapping file can be generated only once and used for a plurality of times, thereby realizing a HTTP request call while reducing development difficulty and increasing a reuse rate.

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 (UniformResource 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 Patents(China)
IPC IPC(8): H04L29/08H04L29/06H04L12/46
CPCG06F9/44
Inventor 杨思枢
Owner ALIBABA GRP HLDG LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products