[python] Django–templates, static files, django template syntax, requests and responses

The notes are study notes compiled by myself. If there are any mistakes, please point them out~ [Django column] Django–Introduction to Django, installation of Django, creating projects, and getting started quickly Django – templates, static files, django template syntax, requests and responses Django – connect to mysql database Django–templates, static files, django template syntax, requests […]

ESP32 IDF development application? http request

ESP32 IDF development application? http request 1. The blogger’s purpose for writing this technical article: 2. Overview 3. HTTP request 4. HTTP response 6. HTTP response status code 7. Introduction to related APIs 8. Software design 9. Example 10. Debugging results Don’t get lost-Navigation bar Quickly navigate to find what you want (article directory) If […]

Can requests initiated by JS in the front end be paused?

Recommend a practical interview question bank to everyone 1. Front-end interview question bank (Essential for interviews) Recommended: Address: Web front-end interview question bank This question is very interesting. As soon as I saw it, I thought of a lot of answers to it, but the comment area was too narrow, so I just opened an […]

How AJAX uses get requests to submit data to the server and achieve partial data refresh——AJAX

<!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <title>Title</title> </head> <body> <script type=”text/javascript”> window.onload = function () { document.getElementById(“btn”).onclick = function () { var ajax = new XMLHttpRequest(); ajax.onreadystatechange = function () { if(ajax.readyState === 4) { if(ajax.status === 200) { document.getElementById(“mySpan”).innerHTML = ajax.responseText; } else { alert(ajax.status); } } } //Open channel var username = […]

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 […]

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 […]

Java Post request parameter format is XML

Method 1: public static void PostXml1(String url, String xml) throws IOException {<!– –> OkHttpClient client = new OkHttpClient().newBuilder().build(); //okhttp3.MediaType mediaType = okhttp3.MediaType.parse(“application/xml”); okhttp3.MediaType mediaType = okhttp3.MediaType.parse(“text/xml”); //RequestBody body = RequestBody.create(mediaType, “<messages xmlns=”http://www.neusoft.com/hit/rhin”>\r\\ <heartbeat>\ r\\ 0\r\\ </heartbeat>\r\\ <switchset>\r\\ <authority>\r\\ <authoritytype>\r\\ 0\ \r\\ </authoritytype>\r\\ <username/>\r\\ <userpwd/>\r\\ <license/>\r\\ </authority>\ \r\\ <visitor>\r\\ <!– Caller 22-bit organization code –>\r\\ <sourceorgan>\r\\ […]

Django file configuration, request object, connection to MySQL, ORM

Article directory Django static files and related configurations Static file preface Static file related configuration form form request object request request result GET request POST request pycharm connects to database Django connects to MySQL Introduction to Django ORM Django static files and related configuration In this blog I will introduce relevant knowledge through a user […]