Tag:Network request

  • An example of how to implement network request with flutter


    The flutter network request uses DIO. Dio is a powerful and easy-to-use dart HTTP request library, which supports restful API, formdata, interceptor, request cancellation, cookie management, file upload / download The flutter JSON data parsing uses the JSON ﹣ serializable package package. It is an automated source code generator that can generate JSON serialization templates […]

  • AFNetworking


    AFN Why AFN In most projects, we use network requests to interact with the server. For IOS developers, the most well-known network request framework isAFNetworkingNow, have you ever thought about why the majority of developers choose it? What’s the difference between it and IOS native network request? I’ll summarize my own views and experience on […]

  • Detailed explanation of the encapsulation of the flutter network request framework


    Three ways to request network from flutter There are three ways for flutter to request network: DART’s native network request httpclient, the third-party network request HTTP and DIO in flutter. We can compare these three kinds of network request methods, and then encapsulate them as our tool class for convenient network request. Dart native network […]

  • Three simple ways to implement the network request of flutter


    Summary: App can hardly be separated from the interaction with the server. This paper mainly introduces three ways of network request: httpclient, the third-party library HTTP and the third-party library DIO. This paper is a summary of the author’s knowledge of the network module of flutter. If there is any problem, I hope you can […]

  • Rxjava + retrofit to encapsulate network requests


    Brief introduction Retrofit is a widely used network request framework, which is usually combined with rxjava to make network requests. This paper will show a network request demo using rxjava + retrofit Integration steps 1. Add dependency in build.gradle of APP project //retrofit2 implementation ‘com.google.code.gson:gson:2.8.5’ implementation ‘com.squareup.retrofit2:retrofit:2.5.0’ implementation ‘com.squareup.retrofit2:converter-gson:2.5.0’ implementation ‘com.squareup.okhttp3:okhttp:3.12.2’ implementation ‘com.squareup.okhttp3:logging-interceptor:3.11.0’ //rxjava2 implementation […]

  • On rxswift network request


    I. description Rxswift has been in the pit for some time. Before, rxswift was only used in a small range in the project. In order to better use reactive programming, rxswift was decided to be used in a wider range in the project. Then, the network request of rxswift was studied. Now, the cases about […]

  • The difference between get and post in HTTP


    GETandPOSTisHTTPThe two basic methods of request, to say the difference between them, have been touched uponWEBDevelopers can tell a thing or two.The most intuitive difference is thisGETInclude the parameters inURL,POSTthroughrequest bodyPass parameters. You’ve probably written countless of them yourselfGETandPOSTRequests, or having read a lot of authoritative websites summarizing their differences, you know exactly what to […]

  • Implementation Method of iOS Using Moya Network Request


    As I wrote this article a while ago, the latest Moya has updated the latest version, so I have updated the following usage. I have used it, and I intentionally send you the latest demo for your reference. Moya 11.0.2 Demo Moya introduction Moya is the missing network layer in your app. Instead of thinking […]

  • C# Example Code for Network Request and JSON Parsing


    Haikang Camera Centralized Control Platform of the latest school (web side) can not be logged on in Win10. I am thinking about how to change Haikang’s c_demo directly. First of all, we have to solve the problem of permission. Each teacher teaches in different grades, and can only see the equipment in his grade. It […]

  • Implementation of File Operation and Network Request in Scala


    1. Read data for each line in the file def main(args: Array[String]): Unit = { // pay attention to the encoding format of the file. If the encoding format is not correct, read the wrong report. val file: BufferedSource = Source.fromFile(“F:\\files\\file.txt”,”GBK”); val lines: Iterator[String] = file.getLines() for(line <- lines){ println(line) } // Pay attention to […]

  • Detailed steps for setting HTTP requests in Wechat applet


    Introduction to HTTP requests HTTP (HyperText Transfer Protocol) is a set of rules for computers to communicate through the network. Computer experts have designed HTTP to enable HTTP clients (such as Web browsers) to request information and services from HTTP servers (Web servers). The current version of HTTP protocol is 1.1. HTTP is a stateless […]

  • Comprehensive analysis of network request mode in front-end


    I. The Focus of Front-end Network Request In most cases, when launching a network request at the front end, we only need to focus on the following points: Afferent basic parameters(urlRequest method) Request parameters, request parameter types Setting the request header How to get the response Get response head, response status, response results exception handling […]