귀찮은curl 명령어 포스트맨 가져오기
개시하다
여러 줄의curl 명령을 편집하는 것은 매우 번거롭다.Postman을 가져와 관리합니다.
테스트용 API
curl 명령 테스트는 httpbin을 사용합니다.
다음은 POST 데이터입니다.
curl.sh
curl --location --request POST 'httpbin.org/anything' \
--header 'Content-Type: application/json' \
--data-raw '{
    "assignedRuleIDs": [
        0
    ],
    "recommendationScanStatus": "none",
    "lastRecommendationScanDate": 0,
    "recommendedToAssignRuleIDs": [
        0
    ],
    "recommendedToUnassignRuleIDs": [
        0
    ]
}'
앵무새의 POST 데이터가 응답을 반환합니다.{
  "args": {},
  "data": "{\n    \"assignedRuleIDs\": [\n        0\n    ],\n    \"recommendationScanStatus\": \"none\",\n    \"lastRecommendationScanDate\": 0,\n    \"recommendedToAssignRuleIDs\": [\n        0\n    ],\n    \"recommendedToUnassignRuleIDs\": [\n        0\n    ]\n}~",
  "files": {},
  "form": {},
  "headers": {
    "Accept": "*/*",
    "Content-Length": "230",
    "Content-Type": "application/json",
    "Host": "httpbin.org",
    "User-Agent": "curl/7.81.0",
    "X-Amzn-Trace-Id": "Root=1-6262a801-262cfbc610a60f6943b2452f"
  },
  "json": null,
  "method": "POST",
  "origin": "xxx.xx.xxx.xxx",
  "url": "http://httpbin.org/anything"
}
  Postman에서 curl 명령 가져오기
 총결산
Postman에서 Curl 명령을 Request로 간단히 가져올 수 있습니다.Postman 기능으로 변수를 설정하면 Pythhon/JavaScript/PHP/PowerShell 등의 코드로 변환할 수 있어 편리하다.
Reference
이 문제에 관하여(귀찮은curl 명령어 포스트맨 가져오기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://zenn.dev/valmet083/articles/4c380bc529d699텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)