TsgcHTTP3Client › 메서드 › Post
본문 페이로드와 함께 동기식 HTTP/3 POST 요청을 보내고 응답 본문을 반환합니다.
function Post(const aURL: string; const aData: string; const aContentType: string = 'application/x-www-form-urlencoded'): string;
| Name | Type | 설명 |
|---|---|---|
aURL | const string | 요청이 전송되는 리소스의 절대 URL입니다. |
aData | const string | 서버로 전송되는 요청 본문. |
aContentType | const string | content-type 헤더의 값. 기본값은 application/x-www-form-urlencoded입니다. |
서버에서 수신한 응답 본문(문자열로 디코딩됨). (string)
Post는 전체 HTTP/3 응답을 받을 때까지 호출 스레드를 차단하고 본문을 문자열로 반환합니다. aContentType을 페이로드에 맞게 설정하십시오. 예를 들어 JSON 문서를 전송할 때는 application/json을 사용합니다. 논블로킹 요청을 사용하려면 PostAsync를 사용하면 OnResponse에 응답이 전달됩니다.
vResponse := oClient.Post('https://api.example.com/v1/login', 'user=john&pass=secret');