php
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://sns.shenruxiang.com/api/v1/tx',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
js
const url = new URL(
"http://sns.shenruxiang.com/api/v1/tx"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
bash
curl -X POST \
"http://sns.shenruxiang.com/api/v1/tx" \
-H "Content-Type: application/json" \
-H "Accept: application/json"