Request -- Make Node.js http requests super simple

Previously, we paid more attention to the front-end, but less attention to the back-end. However, I have always been interested in Node.js, and I went to CNODE exchange party in Ali last December. I hope to share some notes about learning Node.js through my blog here in the future. On the one hand, I summarized my learning experience, on the ...

Posted by Bootsman123 on Fri, 22 Mar 2019 11:54:52 -0700

Node.js Foundation 9: web Server 2 - Processing data sent by GET or POST requests

Processing data sent by GET or POST requests Handling GET requests The request.url in the server brings in the query string as well.Solution:Using url libraries to parse,So pathname is the string before the query string.url libraries can do some processing on urls. They can take some host names, protocols and other data. For example, let's pars ...

Posted by Dutch MaFia-boy on Mon, 18 Mar 2019 08:15:26 -0700

vue+node full stack mobile mall [4] - create get, send interface, receive data update view

In the previous section, we implemented the first interface and received the return {a:123} when requesting the interface. Next, we implemented a simple get and set interface and updated the page view with the returned data. This is the page view we want to implement. The code is as follows. <template> <div> <h1>{{ msg ...

Posted by dsnhouse on Wed, 13 Feb 2019 03:27:18 -0800

Novelty Xiaobai uses node.js to build a simple server (requestable pictures, html,js,css,json, etc.)

Using node.js to build a simple server Preface: The following steps are carried out under the premise of installing node. If you do not install node, please install node first and try again. Note: If there are errors in the following code, readers are welcome to point out. The construction steps are as follows: 1. C ...

Posted by sales@gmba.dk on Tue, 05 Feb 2019 18:45:17 -0800

node Implements Piecewise Download

Based on http Range Requests protocol, this paper realizes the function of fragmented download. Use scenarios include browser-based streaming file fragment transfer, client-based fragmented download, etc. principle http through Range Requests related header, can negotiate with the server to achieve partial requests. Here we will not elaborate o ...

Posted by goldages05 on Fri, 01 Feb 2019 15:51:15 -0800

How does Axios cancel a sent request?

Recently, I encountered a problem that if the second request is faster than the first one when sending the same request in succession, then the data of the first request is actually displayed, which will result in inconsistency between the data and the content I choose. Solution: When subsequent requests are sent, determine whe ...

Posted by dcgamers on Wed, 30 Jan 2019 00:03:16 -0800

Consumption of Web service s on SAP Cloud for Customer using nodejs

Jerry in the Public Document C4C and Wechat Integration Series Noejs was used to consume standard web services provided by C4C. Take a concrete example: Individual Customers in C4C can maintain Social User Profile. In Jerry's public document above, it is the open ID of micro-credit users that is maintained in the Social Media Account User ID fi ...

Posted by achintha on Mon, 28 Jan 2019 19:48:14 -0800

NestJs Concise Tutorial

After looking at koa,express and their derivative frameworks, it seems that NodeJs'Web development framework can not jump out of a fixed pattern. This question also bothers PHP. Is it possible to simplify development through annotations?In fact, PHP has "annotations", but it is implemented by reading annotations through reflection, wh ...

Posted by asy1mpo on Sun, 27 Jan 2019 09:51:14 -0800

gulp-based front-end automation scheme

Preface In recent years, front-end technology has developed rapidly, especially the popularization of single-page applications. Componentization, engineering and automation have become the trend of front-end development. webpack has become the mainstream of front-end packaging construction, but some antique projects still exist, there is also t ...

Posted by Biocide on Fri, 25 Jan 2019 06:24:14 -0800

Explain the common traversal methods of arrays

Preface This paper mainly introduces the common traversal methods of arrays: forEvery, map, filter, find, every, some, reduce. They have one thing in common: they do not change the original array. 1. forEach: Traversing arrays var colors = ["red","blue","green"]; // ES5 traversal array method for(var i = 0; i < colors.length; i++){ consol ...

Posted by golden_water on Sat, 19 Jan 2019 19:27:12 -0800