1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
---
title: Accept
slug: Web/HTTP/Headers/Accept
tags:
- HTTP
- HTTP Başlığı
- Referans
- İstek başlığı
translation_of: Web/HTTP/Headers/Accept
---
<p>{{HTTPSidebar}}</p>
<p>Accept <strong><code>HTTP</code></strong> başlığı, istemcinin hangi içerik tiplerini(<a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME types</a>) anlayabileceğini sunucuya söyler. Sunucu <a href="https://wiki.developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation">content negotiation</a> kullanarak bu tiplerden birini seçer ve istemciye {{HTTPHeader("Content-Type")}} başlığı ile seçimini gönderir. Tarayıcılar bu başlığın belirttiği içerik tipine göre gerekli değerleri ayarlar. CSS, resim, video veya script dosyaları için farklı değerler ayarlanır.</p>
<table class="properties">
<tbody>
<tr>
<th scope="row">Başlık türü</th>
<td>
<p>{{Glossary("Request header")}}</p>
</td>
</tr>
<tr>
<th scope="row">{{Glossary("Forbidden header name")}}</th>
<td>hayır</td>
</tr>
<tr>
<th scope="row">{{Glossary("CORS-safelisted request header")}}</th>
<td>Evet ama CORS-güvensiz başlık baytlarını içermemelidir: 0x00-0x1F(0x09 (HT) hariç), <code>"():<>?@[\]{}</code> ve 0x7F(DEL).</td>
</tr>
</tbody>
</table>
<h2 id="Söz_Dizimi">Söz Dizimi</h2>
<pre class="syntaxbox notranslate">Accept: <MIME_type>/<MIME_subtype>
Accept: <MIME_type>/*
Accept: */*
// Çok tipli, <a href="https://developer.mozilla.org/en-US/docs/Glossary/quality_values">ağırlık</a> belirtilebilir söz dizimi:
Accept: text/html, application/xhtml+xml, application/xml;q=0.9, image/webp, */*;q=0.8
</pre>
<h2 id="Komutlar">Komutlar</h2>
<dl>
<dt><code><MIME_type>/<MIME_subtype></code></dt>
<dd>Tek <a href="/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME tip</a>, mesela <code>text/html</code>.</dd>
<dt><code><MIME_type>/*</code></dt>
<dd>Bir MIME tip altında herhangi bir alt tip. <code>image/*</code> tipi <code>image/png</code>, <code>image/svg</code>, <code>image/gif</code> tiplerini kapsar.</dd>
<dt><code>*/*</code></dt>
<dd>Herhangi bir MIME tip</dd>
<dt><code>;q=</code> (ağırlık)</dt>
<dd>Sıralamayı belirtmek için <a href="/en-US/docs/Glossary/Quality_values">ağırlık</a> denilen bir değer kullanılabilir.</dd>
</dl>
<h2 id="Örnekler">Örnekler</h2>
<pre class="notranslate">Accept: text/html
Accept: image/*
// Çoğu tarayıcıda varsayılan olarak gönderilir
Accept: */*
// Gezinme için varsayılan
Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8
</pre>
<h2 id="Şartname">Şartname</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Şartname</th>
<th scope="col">İsim</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{RFC("7231", "Accept", "5.3.2")}}</td>
<td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Context</td>
</tr>
</tbody>
</table>
<h2 id="Tarayıcı_uyumluluğu">Tarayıcı uyumluluğu</h2>
<p class="hidden">Uyumluluk tablosu hazır verilerden otomatik olarak oluşturulmuştur. Eğer bu verilere katkı yapmak isterseniz lütfen <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> adresini inceleyin.</p>
<p>{{Compat("http.headers.Accept")}}</p>
<h2 id="İlişkili_konular">İlişkili konular</h2>
<ul>
<li>HTTP <a href="/en-US/docs/Web/HTTP/Content_negotiation">content negotiation</a></li>
<li>Content negotiation sonucunu belirten başlık: {{HTTPHeader("Content-Type")}}</li>
<li>Diğer benzer başlıklar: {{HTTPHeader("TE")}}, {{HTTPHeader("Accept-Encoding")}}, {{HTTPHeader("Accept-Charset")}}, {{HTTPHeader("Accept-Language")}}</li>
</ul>
|