본문 바로가기
728x90

postman3

ASP.NET Core Restfull API 및 postman 호출 with visual studio 2022 A. 웹 프로젝트 만들기 파일 메뉴에서 새로 만들기>프로젝트를 선택합니다. 검색 상자에 Web API를 입력합니다. ASP.NET Core Web API 템플릿을 선택하고 다음을 선택합니다. 새 프로젝트 대화 상자 구성에서 TodoApi 프로젝트 이름을 지정하고 다음을 선택합니다. 추가 정보 대화 상자에서 다음을 수행합니다. 프레임워크가 .Net 6.0(장기 지원)인지 확인합니다. 컨트롤러 사용(최소 API를 사용하려면 선택 취소) 확인란을 선택합니다. 만들기를 선택합니다. B. launchUrl 업데이트 Properties\launchSettings.json에서 launchUrl을 "swagger"에서 "api/todoitems"로 업데이트합니다. "launchUrl": "api/todoitems", .. 2022. 6. 12.
Postman Tests documentation Postman Tests Add request -> Tests pm.test("Status test", function(){ pm.response.to.have.status(200); }); pm.test("Body matches string", function(){ pm.expect(pm.response.text()).to.include("success"); }); 인증키를 부모개체로부터 상속받아 쓰기 Run collection Postman documentation -> Add example 2022. 4. 23.
postman 에서 oauth2인증 후 json 데이타 보내기 postman 에서 oauth2인증 후 json 데이타 보내기 1. postman 에서 oauth2인증 New Collection -> Type : OAuth 2.0 -> Add auth data to : Request Headers -> Access Token : Configure New Token 에서 받아온 토큰값을 입력 후 옆에 싱크 버튼 클릭 Configure New Token -> Grant Type : Authorization Code -> Callback URL : https://oauth.pstmn.io/v1/callback?code=authiruztion code -> Auth URL -> Access Token URL -> Client ID -> Client Secret -> Scop.. 2022. 4. 22.
728x90