Matinal: Analysis of the whole process of SAP ABAP publishing HTTP RestFul service (1)

1.SE24 new class: ZCL_REST_QUERY Activate, then add interface:IF_HTTP_EXTENSION and activate. 2. Implement IF_HTTP_EXTENSION~HANDLE_REQUEST: METHOD IF_HTTP_EXTENSION~HANDLE_REQUEST. DATA: LT_FIELDS TYPE TIHTTPNVP, LV_HEADER_QUERY TYPE STRING, LV_DATA TYPE STRING, LV_HTML TYPE STRING. FIELD-SYMBOLS: <FS_FIELD> LIKE LINE OF LT_FIELDS. *” get HEADER fields SERVER->REQUEST->GET_HEADER_FIELDS( CHANGING FIELDS = LT_FIELDS ” Header fields ). LV_DATA = SERVER->REQUEST->IF_HTTP_ENTITY~GET_CDATA( ). ” Read the fields […]

Network Principles—Getting to Know the HTTP Protocol: Requests and Responses

Article directory Recognition request first line URL URL format URL encode and decode version number method GET method POST method GET VS POST Request header: header Host Content-Length and Content-Type User-Agent(UA) Referer Cookies blank line Text: body How to construct an HTTP request? The browser constructs its own HTML structure ajax construct Third-party tools: postman […]

A brief analysis of network protocols-HTTP protocol

1. Introduction to HTTP The HTTP protocol is the abbreviation of Hyper Text Transfer Protocol, which is a transfer protocol used to transfer hypertext from the World Wide Web (WWW: World Wide Web) server to the local browser. HTTP is a communication protocol based on TCP/IP to transfer data (HTML files, image files, query results, […]

Simple analysis of okhttp request process

As the network request framework okhttp is mainly promoted by Google, many times we use it directly without knowing how to do it internally. If you know the internal process, it will be much easier to expand and deal with some bugs. Next, let’s briefly analyze the request process. First we create an okhttpclient //Use […]

ElasticSearch7.x – HTTP operation – Query document operation

Query all documents under the index http://192.168.254.101:9200/shopping/_search Conditional query Add conditions to the request path: http://192.168.254.101:9200/shopping/_search?q=category:Xiaomi Add conditions to the request body: http://192.168.254.101:9200/shopping/_search Request body content {<!– –> “query” :{<!– –> “match”:{<!– –> “category”:”Xiaomi” } } } If the request body content is as follows, it is a full query {<!– –> “query” :{<!– –> […]

Three-party HTTP interface call: POST&GET (supports HTTPS)

1. POST request 1.HTTP tool class import org.apache.http.HttpEntity; import org.apache.http.NameValuePair; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.conn.ssl.TrustStrategy; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.message.BasicNameValuePair; import org.apache.http.ssl.SSLContextBuilder; import org.apache.http.util.EntityUtils; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSession; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.security.GeneralSecurityException; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.util.ArrayList; import […]

HTTPS request process development example (ArkTS) based on HarmonyOS

Introduction This codelab implements an HTTPS request based on the network module and Webview, and performs packet capture analysis on the process. The effect is as shown in the figure: Related concepts ● Webview: Provides Web control capabilities, and Web components provide web page display capabilities. ● HTTP data request: The network management module provides […]

High-performance network request framework OKHTTP

OkHttp is an open source HTTP client library for making network requests and handling responses in Java and Kotlin applications. Developed by Square, it provides a simple, efficient and easy-to-use API. Supports HTTP/2 and SPDY: OkHttp supports the latest HTTP protocol versions, including HTTP/2 and SPDY, to provide faster and more efficient network communication. Connection […]