Request handling method and device based on API intelligent adaption
A request processing and adaptation technology, applied in the Internet field, can solve problems such as reducing user experience, service invocation failure, and inconsistent input and output, and achieve the effect of improving user experience and reducing management costs.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
specific Embodiment 1
[0056] The gateway receives an API request for purchasing a certain service from the client, and the receiving target of the API request is the first service party. After the gateway receives the API request from the client, it judges that the format of the API request is XML format, and the format supported by the first server is JSON format. The gateway searches for preset adaptation rules. Reconstruct a new API request conforming to the parameter configuration rules in JSON format according to the adaptation rules, and send the constructed new API request to the first server.
specific Embodiment 2
[0057]The gateway receives an API request for purchasing a certain service from the client, and the receiving target of the API request is the first service party. After the gateway receives the API request from the client, it judges that the protocol version of the API request is XML version 3.0, and the format supported by the first server is XML version 4.0. The gateway searches for the preset matching rules between version 3.0 and version 4.0. Reconstruct a new API request conforming to the parameter configuration rules of version 4.0 according to the adaptation rules, and send the constructed new API request to the first server.
specific Embodiment 3
[0058] This specific embodiment 3 is applied to a scenario where a certain data field in an API request is changed.
[0059] The original interface format of the service used to obtain the user's avatar information is
[0060] GET / user / profile? id=01234567
[0061] After this interface has been running for a period of time, another business develops a new interface to achieve the same function. The format of the new interface is as follows:
[0062] GET / user / profile? name=01234567
[0063] At this time, there will be two versions of the old and new versions of the interface in the same function within the enterprise, which makes it very inconvenient for users to call the interface, and then switch to different interfaces according to different scenarios.
[0064] According to the gist of the present invention, two backends are added to this function. Specifically, the enterprise can configure the interface provided by the API gateway, such as on the API management platfo...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com