22 Şubat 2023 Çarşamba

IntelliJ Idea HttpClient İle Debug

Giriş
Açıklaması şöyle
We just create a file inside root folder of the app, type any name we want and add .http extension at the end. HTTP request syntax is pretty simple.
Örnek
Şöyle yaparız
// Add new product to the database
POST http://localhost:8080/api/v1/admin
Content-Type: application/json
Accept: application/json

{
  "brand": "Bombbar",
  "category": "cookie",
  "name": "Protein cookie",
  "flavour": "Chocolate brownie",
  "caloriesPer100Gram": 271,
  "weight": 40
}

###

// Get info about the product from the database
GET http://localhost:8080/api/v1/client?brand=Bombbar
Accept: application/json
Örnek
Şöyle yaparız
POST http://localhost:8080/clients
Content-Type: application/json

{
  "clientId": "my-trusted-ui",
  "clientSecret": "Passw0rd#",
  "scope": "read, write",
  "authorizedGrantTypes": "password,refresh_token",
  "authorities": "USER,BUSINESS",
  "accessTokenValidity": 93601,
  "refreshTokenValidity": 604801,
  "additionalInformation": "none"
}


Hiç yorum yok:

Yorum Gönder