> For the complete documentation index, see [llms.txt](https://furkans-organization-1.gitbook.io/cypress-notlari/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://furkans-organization-1.gitbook.io/cypress-notlari/16.-cypress-get-ve-post-islemleri.md).

# 16. Cypress  Get ve Post İşlemleri

## Get Metodu

Bir Get işlemi gerçekleştirmek için cy.request() ile bir HTTP isteği yapacağız ve Get yöntemini ve URL'yi bu yönteme parametre olarak geçmeliyiz.

```javascript
describe("Get Method", function(){
    it("Scenario 2", function(){
    cy.request("GET", "https://jsonplaceholder.cypress.io/comments", {})
        .then((r) => {
            expect(r.status).to.eq(200)
            expect(r).to.have.property('headers')
            expect(r).to.have.property('duration')
        });
    })
})
```

## Post Metodu

Post yöntemini kullanırken aslında bilgi gönderiyoruz. Eğer elimizde bir grup varlıkları, Post'un yardımıyla sonuna yenilerini ekleyebiliriz.

```javascript
describe("Post Method", function(){
    it("Scenario 3", function(){
        cy.request('https://jsonplaceholder.cypress.io/users?_limit=1')
            .its('body.0') // yields the first element of the returned list
        
        // make a new post on behalf of the user
        cy.request('POST', 'https://jsonplaceholder.cypress.io/posts', {
            title: 'Cypress',
            body: 'Automation Tool',
        })
    })
 });
```
