Skip to content

Commit c553628

Browse files
Merge branch 'gh-pages' into refactor-lang-picker
2 parents bd4ccc8 + ae6197f commit c553628

File tree

11 files changed

+71
-56
lines changed

11 files changed

+71
-56
lines changed

_includes/api/en/4x/req-is.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,22 @@ req.is('application/json')
2121
req.is('application/*')
2222
// => 'application/*'
2323

24+
// Using arrays
25+
// When Content-Type is application/json
26+
req.is(['json', 'html'])
27+
// => 'json'
28+
29+
// Using multiple arguments
30+
// When Content-Type is application/json
31+
req.is('json', 'html')
32+
// => 'json'
33+
2434
req.is('html')
2535
// => false
36+
req.is(['xml', 'yaml'])
37+
// => false
38+
req.is('xml', 'yaml')
39+
// => false
2640
```
2741

28-
For more information, or if you have issues or concerns, see [type-is](https://github.com/expressjs/type-is).
42+
For more information, or if you have issues or concerns, see [type-is](https://github.com/expressjs/type-is).

_includes/api/en/5x/req-is.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,17 @@ req.is('json') // => 'json'
1515
req.is('application/json') // => 'application/json'
1616
req.is('application/*') // => 'application/*'
1717

18-
req.is('html')
19-
// => false
18+
// Using arrays
19+
// When Content-Type is application/json
20+
req.is(['json', 'html']) // => 'json'
21+
22+
// Using multiple arguments
23+
// When Content-Type is application/json
24+
req.is('json', 'html') // => 'json'
25+
26+
req.is('html') // => false
27+
req.is(['xml', 'yaml']) // => false
28+
req.is('xml', 'yaml') // => false
2029
```
2130

2231
For more information, or if you have issues or concerns, see [type-is](https://github.com/expressjs/type-is).

de/guide/using-middleware.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redirect_from: " "
1010

1111
Express ist ein Weiterleitungs- und Middleware-Web-Framework, das selbst nur minimale Funktionalität aufweist: Eine Express-Anwendung besteht im Wesentlichen aus einer Reihe von Middlewarefunktionsaufrufen.
1212

13-
_Middlewarefunktionen_ sind Funktionen, die Zugriff auf das [Anforderungsobjekt](/{{ page.lang }}/4x/api.html#req) (`req`), das [Antwortobjekt](/{{ page.lang }}/4x/api.html#res) (`res`) und die nächste Middlewarefunktion im Anforderung/Antwort-Zyklus der Anwendung haben. Die nächste Middlewarefunktion wird im Allgemeinen durch die Variable `next` bezeichnet.
13+
_Middleware_ functions are functions that have access to the [request object](/{{ page.lang }}/5x/api.html#req) (`req`), the [response object](/{{ page.lang }}/5x/api.html#res) (`res`), and the next middleware function in the application's request-response cycle. Die nächste Middlewarefunktion wird im Allgemeinen durch die Variable `next` bezeichnet.
1414

1515
Über Middlewarefunktionen lassen sich die folgenden Tasks ausführen:
1616

@@ -34,7 +34,7 @@ Sie können auch eine Reihe von Middlewarefunktionen zusammen laden. Dadurch wir
3434

3535
<h2 id='middleware.application'>Middleware auf Anwendungsebene</h2>
3636

37-
Binden Sie Middleware auf Anwendungsebene zu einer Instanz des [Anwendungsobjekts](/{{ page.lang }}/4x/api.html#app), indem Sie die Funktionen `app.use()` und `app.METHOD()` verwenden. `METHOD` ist dabei die HTTP-Methode der Anforderung, die die Middlewarefunktion in Kleinschreibung verarbeitet (wie GET, PUT oder POST).
37+
Bind application-level middleware to an instance of the [app object](/{{ page.lang }}/5x/api.html#app) by using the `app.use()` and `app.METHOD()` functions, where `METHOD` is the HTTP method of the request that the middleware function handles (such as GET, PUT, or POST) in lowercase.
3838

3939
Dieses Beispiel zeigt eine Middlewarefunktion ohne Mountpfad. Die Funktion wird immer dann ausgeführt, wenn die Anwendung eine Anforderung erhält.
4040

@@ -248,9 +248,9 @@ Seit Version 4.x bestehen bei Express keine Abhängigkeiten zu [Connect](https:/
248248

249249
Die einzige integrierte Middlewarefunktion in Express ist `express.static`.
250250

251-
- [express.static](/en/4x/api.html#express.static) serves static assets such as HTML files, images, and so on.
252-
- [express.json](/en/4x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
253-
- [express.urlencoded](/en/4x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
251+
- [express.static](/en/5x/api.html#express.static) serves static assets such as HTML files, images, and so on.
252+
- [express.json](/en/5x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
253+
- [express.urlencoded](/en/5x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
254254

255255
<h2 id='middleware.third-party'>Middleware anderer Anbieter</h2>
256256

es/guide/using-middleware.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redirect_from: " "
1010

1111
Express es una infraestructura web de direccionamiento y middleware que tiene una funcionalidad mínima propia: una aplicación Express es fundamentalmente una serie de llamadas a funciones de middleware.
1212

13-
Las funciones de _middleware_ son funciones que tienen acceso al [objeto de solicitud](/{{ page.lang }}/4x/api.html#req) (`req`), al [objeto de respuesta](/{{ page.lang }}/4x/api.html#res) (`res`) y a la siguiente función de middleware en el ciclo de solicitud/respuestas de la aplicación. La siguiente función de middleware se denota normalmente con una variable denominada `next`.
13+
_Middleware_ functions are functions that have access to the [request object](/{{ page.lang }}/5x/api.html#req) (`req`), the [response object](/{{ page.lang }}/5x/api.html#res) (`res`), and the next middleware function in the application's request-response cycle. La siguiente función de middleware se denota normalmente con una variable denominada `next`.
1414

1515
Las funciones de middleware pueden realizar las siguientes tareas:
1616

@@ -34,7 +34,7 @@ También puede cargar una serie de funciones de middleware a la vez, lo que crea
3434

3535
<h2 id='middleware.application'>Application-level middleware</h2>
3636

37-
Enlace el middleware de nivel de aplicación a una instancia del [objeto de aplicación](/{{ page.lang }}/4x/api.html#app) utilizando las funciones `app.use()` y `app.METHOD()`, donde `METHOD` es el método HTTP de la solicitud que maneja la función de middleware (por ejemplo, GET, PUT o POST) en minúsculas.
37+
Bind application-level middleware to an instance of the [app object](/{{ page.lang }}/5x/api.html#app) by using the `app.use()` and `app.METHOD()` functions, where `METHOD` is the HTTP method of the request that the middleware function handles (such as GET, PUT, or POST) in lowercase.
3838

3939
Este ejemplo muestra una función de middleware sin ninguna vía de acceso de montaje. The function is executed every time the app receives a request.
4040

@@ -247,9 +247,9 @@ Desde la versión 4.x, Express ya no depende de [Connect](https://github.com/sen
247247

248248
La única función de middleware incorporado en Express es `express.static`.
249249

250-
- [express.static](/en/4x/api.html#express.static) serves static assets such as HTML files, images, and so on.
251-
- [express.json](/en/4x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
252-
- [express.urlencoded](/en/4x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
250+
- [express.static](/en/5x/api.html#express.static) serves static assets such as HTML files, images, and so on.
251+
- [express.json](/en/5x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
252+
- [express.urlencoded](/en/5x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
253253

254254
<h2 id='middleware.third-party'>Third-party middleware</h2>
255255

fr/guide/using-middleware.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redirect_from: " "
1010

1111
Express est une infrastructure web middleware et de routage, qui a des fonctions propres minimes : une application Express n'est ni plus ni moins qu'une succession d'appels de fonctions middleware.
1212

13-
Les fonctions de _middleware_ sont des fonctions qui peuvent accéder à l'[objet Request](/{{ page.lang }}/4x/api.html#req) (`req`), l'[objet response](/{{ page.lang }}/4x/api.html#res) (`res`) et à la fonction middleware suivant dans le cycle demande-réponse de l'application. La fonction middleware suivant est couramment désignée par une variable nommée `next`.
13+
_Middleware_ functions are functions that have access to the [request object](/{{ page.lang }}/5x/api.html#req) (`req`), the [response object](/{{ page.lang }}/5x/api.html#res) (`res`), and the next middleware function in the application's request-response cycle. La fonction middleware suivant est couramment désignée par une variable nommée `next`.
1414

1515
Les fonctions middleware effectuent les tâches suivantes :
1616

@@ -34,7 +34,7 @@ Vous pouvez également charger une série de fonctions middleware ensemble, ce q
3434

3535
<h2 id='middleware.application'>Middleware niveau application</h2>
3636

37-
Liez le middleware niveau application à une instance de l'objet [app object](/{{ page.lang }}/4x/api.html#app) en utilisant les fonctions `app.use()` et `app.METHOD()`, où `METHOD` est la méthode HTTP de la demande que gère la fonction middleware (par exemple GET, PUT ou POST) en minuscules.
37+
Bind application-level middleware to an instance of the [app object](/{{ page.lang }}/5x/api.html#app) by using the `app.use()` and `app.METHOD()` functions, where `METHOD` is the HTTP method of the request that the middleware function handles (such as GET, PUT, or POST) in lowercase.
3838

3939
Cet exemple illustre une fonction middleware sans chemin de montage. La fonction est exécutée à chaque fois que l'application reçoit une demande.
4040

@@ -249,9 +249,9 @@ précédemment incluses à Express' font désormais partie de modules distincts.
249249

250250
La seule fonction middleware intégrée dans Express est `express.static`.
251251

252-
- [express.static](/en/4x/api.html#express.static) serves static assets such as HTML files, images, and so on.
253-
- [express.json](/en/4x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
254-
- [express.urlencoded](/en/4x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
252+
- [express.static](/en/5x/api.html#express.static) serves static assets such as HTML files, images, and so on.
253+
- [express.json](/en/5x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
254+
- [express.urlencoded](/en/5x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
255255

256256
<h2 id='middleware.third-party'>Middleware tiers</h2>
257257

it/guide/using-middleware.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redirect_from: " "
1010

1111
Express è un framework Web di routing e middleware, con funzionalità sua propria minima: un'applicazione Express è essenzialmente a serie di chiamate a funzioni middleware.
1212

13-
Le funzioni _middleware_ sono funzioni con accesso all'[oggetto richiesta](/{{ page.lang }}/4x/api.html#req) (`req`), all'[oggetto risposta](/{{ page.lang }}/4x/api.html#res) (`res`) e alla successiva funzione middleware nel ciclo richiesta-risposta dell'applicazione. La successiva funzione middleware viene comunemente denotata da una variabile denominata `next`.
13+
_Middleware_ functions are functions that have access to the [request object](/{{ page.lang }}/5x/api.html#req) (`req`), the [response object](/{{ page.lang }}/5x/api.html#res) (`res`), and the next middleware function in the application's request-response cycle. La successiva funzione middleware viene comunemente denotata da una variabile denominata `next`.
1414

1515
Le funzioni middleware possono eseguire le attività elencate di seguito:
1616

@@ -34,7 +34,7 @@ Un'applicazione Express può utilizzare i seguenti tipi di middleware:
3434

3535
<h2 id='middleware.application'>Middleware a livello dell'applicazione</h2>
3636

37-
Associare il middleware al livello dell'applicazione ad un'istanza dell'[oggetto app](/{{ page.lang }}/4x/api.html#app) utilizzando le funzioni `app.use()` e `app.METHOD()`, dove `METHOD` corrisponde al metodo HTTP della richiesta che la funzione middleware gestisce (ad esempio GET, PUT o POST) in lettere minuscole.
37+
Bind application-level middleware to an instance of the [app object](/{{ page.lang }}/5x/api.html#app) by using the `app.use()` and `app.METHOD()` functions, where `METHOD` is the HTTP method of the request that the middleware function handles (such as GET, PUT, or POST) in lowercase.
3838

3939
Questo esempio presenta una funzione middleware senza percorso di montaggio. La funzione viene eseguita ogni volta che l'app riceve una richiesta.
4040

@@ -249,9 +249,9 @@ middleware che prima erano state incluse in Express, ora sono in moduli separati
249249

250250
L'unica funzione middleware integrata in Express è `express.static`.
251251

252-
- [express.static](/en/4x/api.html#express.static) serves static assets such as HTML files, images, and so on.
253-
- [express.json](/en/4x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
254-
- [express.urlencoded](/en/4x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
252+
- [express.static](/en/5x/api.html#express.static) serves static assets such as HTML files, images, and so on.
253+
- [express.json](/en/5x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
254+
- [express.urlencoded](/en/5x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
255255

256256
<h2 id='middleware.third-party'>Middleware di terzi</h2>
257257

ja/guide/using-middleware.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redirect_from: " "
1010

1111
Express は、それ自体では最小限の機能を備えたルーティングとミドルウェアの Web フレームワークです。Express アプリケーションは基本的に一連のミドルウェア関数呼び出しです。
1212

13-
_ミドルウェア_ 関数は、[requestオブジェクト](/{{ page.lang }}/4x/api.html#req) (`req`)[responseオブジェクト](/{{ page.lang }}/4x/api.html#res) (`res`)、およびアプリケーションのリクエストレスポンスサイクルにおける次のミドルウェア関数に対するアクセス権限を持つ関数です。次のミドルウェア関数は一般的に、`next` という変数で表されます。 The next middleware function is commonly denoted by a variable named `next`.
13+
_Middleware_ functions are functions that have access to the [request object](/{{ page.lang }}/5x/api.html#req) (`req`), the [response object](/{{ page.lang }}/5x/api.html#res) (`res`), and the next middleware function in the application's request-response cycle. The next middleware function is commonly denoted by a variable named `next`.
1414

1515
ミドルウェア関数は以下のタスクを実行できます。
1616

@@ -35,7 +35,7 @@ You can also load a series of middleware functions together, which creates a sub
3535

3636
<h2 id='middleware.application'>アプリケーション・レベルのミドルウェア</h2>
3737

38-
`app.use()` 関数と `app.METHOD()` 関数を使用して、アプリケーション・レベルのミドルウェアを [appオブジェクト](/{{ page.lang }}/4x/api.html#app) のインスタンスにバインドします。ここで、`METHOD` は、ミドルウェア関数が小文字で処理するリクエスト (GETPUT、POST など) の HTTP メソッドです。
38+
Bind application-level middleware to an instance of the [app object](/{{ page.lang }}/5x/api.html#app) by using the `app.use()` and `app.METHOD()` functions, where `METHOD` is the HTTP method of the request that the middleware function handles (such as GET, PUT, or POST) in lowercase.
3939

4040
This example shows a middleware function with no mount path. The function is executed every time the app receives a request.
4141

@@ -249,9 +249,9 @@ Starting with version 4.x, Express no longer depends on [Connect](https://github
249249

250250
Expressには、次のミドルウェア機能が組み込まれています。
251251

252-
- [express.static](/en/4x/api.html#express.static) は、HTMLファイルや画像などの静的リソースを提供します
253-
- [express.json](/en/4x/api.html#express.json) はJSONペイロードで受信したリクエストを解析します。**注:Express 4.16.0以降で利用可能** **NOTE: Available with Express 4.16.0+**
254-
- [express.urlencoded](/en/4x/api.html#express.urlencoded) は、URLエンコードされたペイロードで受信したリクエストを解析します。**注:Express 4.16.0以降で利用可能** **NOTE: Available with Express 4.16.0+**
252+
- [express.static](/en/5x/api.html#express.static) serves static assets such as HTML files, images, and so on.
253+
- [express.json](/en/5x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
254+
- [express.urlencoded](/en/5x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
255255

256256
<h2 id='middleware.third-party'>Third-party middleware</h2>
257257

ko/guide/using-middleware.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ redirect_from: " "
1010

1111
Express는 자체적인 최소한의 기능을 갖춘 라우팅 및 미들웨어 웹 프레임워크이며, Express 애플리케이션은 기본적으로 일련의 미들웨어 함수 호출입니다.
1212

13-
_미들웨어_ 함수는 [요청 오브젝트](/{{ page.lang }}/4x/api.html#req)(`req`), [응답 오브젝트](/{{ page.lang }}/4x/api.html#res) (`res`), 그리고 애플리케이션의 요청-응답 주기 중 그 다음의 미들웨어 함수 대한 액세스 권한을 갖는 함수입니다. 그 다음의 미들웨어 함수는 일반적으로 `next`라는 이름의 변수로 표시됩니다.
13+
_Middleware_ functions are functions that have access to the [request object](/{{ page.lang }}/5x/api.html#req) (`req`), the [response object](/{{ page.lang }}/5x/api.html#res) (`res`), and the next middleware function in the application's request-response cycle. 그 다음의 미들웨어 함수는 일반적으로 `next`라는 이름의 변수로 표시됩니다.
1414

1515
미들웨어 함수는 다음과 같은 태스크를 수행할 수 있습니다.
1616

@@ -34,7 +34,7 @@ Express 애플리케이션은 다음과 같은 유형의 미들웨어를 사용
3434

3535
<h2 id='middleware.application'>애플리케이션 레벨 미들웨어</h2>
3636

37-
`app.use()``app.METHOD()` 함수를 이용해 애플리케이션 미들웨어를 [앱 오브젝트](/{{ page.lang }}/4x/api.html#app)의 인스턴스에 바인드하십시오. 이때 `METHOD`는 미들웨어 함수가 처리하는 요청(GET, PUT 또는 POST 등)의 소문자로 된 HTTP 메소드입니다.
37+
Bind application-level middleware to an instance of the [app object](/{{ page.lang }}/5x/api.html#app) by using the `app.use()` and `app.METHOD()` functions, where `METHOD` is the HTTP method of the request that the middleware function handles (such as GET, PUT, or POST) in lowercase.
3838

3939
다음 예에는 마운트 경로가 없는 미들웨어 함수가 표시되어 있습니다. 이 함수는 앱이 요청을 수신할 때마다 실행됩니다.
4040

@@ -250,9 +250,9 @@ app.use((err, req, res, next) => {
250250

251251
Express has the following built-in middleware functions:
252252

253-
- [express.static](/en/4x/api.html#express.static) serves static assets such as HTML files, images, and so on.
254-
- [express.json](/en/4x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
255-
- [express.urlencoded](/en/4x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
253+
- [express.static](/en/5x/api.html#express.static) serves static assets such as HTML files, images, and so on.
254+
- [express.json](/en/5x/api.html#express.json) parses incoming requests with JSON payloads. **NOTE: Available with Express 4.16.0+**
255+
- [express.urlencoded](/en/5x/api.html#express.urlencoded) parses incoming requests with URL-encoded payloads. **NOTE: Available with Express 4.16.0+**
256256

257257
<h2 id='middleware.third-party'>Third-party middleware</h2>
258258

0 commit comments

Comments
 (0)