// Timestamping Creation curl --request POST \ --url https://api.woleet.io/v1/anchor \ --header 'accept: application/json' \ --header'authorization: Basic <my realm>' \ --header 'content-type: application/json' \ --data '{"name":"anchor-name","hash":"eca13c985af0215408e9e3e7b6bdc0e029db8857b7bedb4c0f2098b88ebe614f"}'
// Timestamping Creation var data = "{\"name\":\"anchor-name\",\"hash\":\"eca13c985af0215408e9e3e7b6bdc0e029db8857b7bedb4c0f2098b88ebe614f\"}"; var xhr = new XMLHttpRequest(); xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("POST", "https://api.woleet.io/v1/anchor"); xhr.setRequestHeader("accept", "application/json"); xhr.setRequestHeader("content-type", "application/json"); xhr.setRequestHeader("authorization", "token"); xhr.send(data);
// Timestamping Creation OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/octet-stream"); RequestBody body = RequestBody.create(mediaType, "{\"name\":\"anchor-name\",\"hash\":\"eca13c985af0215408e9e3e7b6bdc0e029db8857b7bedb4c0f2098b88ebe614f\"}"); Request request = new Request.Builder() .url("https://api.woleet.io/v1/anchor") .post(body) .addHeader("accept", "application/json") .addHeader("content-type", "application/json") .addHeader("authorization", "token") .build(); Response response = client.newCall(request).execute();
// Timestamping Creation import requests url = "https://api.woleet.io/v1/anchor" payload = "{\"name\":\"anchor-name\",\"hash\":\"eca13c985af0215408e9e3e7b6bdc0e029db8857b7bedb4c0f2098b88ebe614f\"}" headers = { 'accept': "application/json", 'content-type': "application/json", 'authorization': "token" } response = requests.request("POST", url, data=payload, headers=headers)