# aiohttp.ClientSession() içerisideki params, data ve json ne işe yarar

1. 📋 `params`: URL'nin sonunda bir soru işaretiyle başlayan ve genellikle anahtar-değer çiftlerinden oluşan sorgu dizelerini oluşturmak için kullanılır.

   ```python
   params = {'tür': 'komedi'}
   async with session.get('<http://filmtadında.com/>', params=params) as resp:
       data = await resp.text()

   ```
2. 📦 `data`: HTTP isteğinin gövdesinde göndermek istediğiniz veriyi belirtir. POST isteklerinde sıklıkla kullanılır.

   ```python
   data = {'name': 'John', 'email': 'john@example.com', 'password': 'secret'}
   async with session.post('<http://website.com/api/users>', data=data) as resp:
       data = await resp.text()

   ```
3. 📄 `json`: HTTP isteğinin gövdesinde göndermek istediğiniz JSON verisini belirtir. JSON formatındaki veriyi otomatik olarak ayarlar ve sunucuya iletir.

   ```python
   json_data = {'name': 'John', 'email': 'john@example.com', 'password': 'secret'}
   async with session.post('<http://website.com/api/users>', json=json_data) as resp:
       data = await resp.text()

   ```

> Yukarıdaki kod parçaları, `aiohttp` kütüphanesi kullanılarak bir aiohttp.ClientSession nesnesi (`session`) içinde çalışacak şekilde tasarlanmıştır. Asenkron I/O, özellikle ağ isteklerinde yüksek performans sağlar. Bu kod parçalarını çalıştırmadan önce, `aiohttp` kütüphanesini kurmanız ve bir `aiohttp.ClientSession`oluşturmanız gerekmektedir.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yemreak.com/arsiv/yazilarim/aiohttp.clientsession-icerisideki-params-data-ve-json-ne-ise-yarar.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
