Table of Contents |
---|
libcurl 은 PHP 언어에도 binding 되어 있어서 손쉽게 사용할 수 있다.
JSON 데이타 POST 예제
JIRA REST API 를 이용해서
...
사용자 등록
Code Block | ||
---|---|---|
| ||
|
...
<?php
$user = array("name" => "userId",
"password" => "userPwd",
"emailAddress" => "user@example.com",
"displayName" => "< USER DISPLAY NAME >",
"notification" => "true");
$json = json_encode($user);
print("$json\n");
$http_status = 0;
$url = "https://jira-host-name/rest/api/2/user/";
$ret = Curl($url, $json, $http_status) ;
var_dump($ret);
?> |
Ref
- PHP curl manual - http://kr1.php.net/manual/en/book.curl.php
- http://www.lornajane.net/posts/2011/posting-json-data-with-php-curl
...