mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
Updated to new JS component versions; #153
This commit is contained in:
parent
1f859bc678
commit
3d783857ab
67 changed files with 555 additions and 236 deletions
|
|
@ -14,22 +14,22 @@ Examples:
|
|||
|
||||
```shell script
|
||||
curl --location --request POST 'http://localhost:8080' \
|
||||
--header 'Content-Type: application/xml' \
|
||||
--data-binary '@/target.xml'
|
||||
--header 'Content-Type: application/xml' \
|
||||
--data-binary '@/target.xml'
|
||||
```
|
||||
|
||||
* `java` (Apache HttpClient)
|
||||
* `Java` (Apache HttpClient)
|
||||
|
||||
```java
|
||||
HttpClient httpClient=HttpClientBuilder.create().build();
|
||||
HttpPost postRequest=new HttpPost("http://localhost:8080/");
|
||||
FileEntity entity=new FileEntity(Paths.get("some.xml").toFile(),ContentType.APPLICATION_XML);
|
||||
postRequest.setEntity(entity);
|
||||
HttpResponse response=httpClient.execute(postRequest);
|
||||
System.out.println(IOUtils.toString(response.getEntity().getContent()));
|
||||
HttpPost postRequest=new HttpPost("http://localhost:8080/");
|
||||
FileEntity entity=new FileEntity(Paths.get("some.xml").toFile(),ContentType.APPLICATION_XML);
|
||||
postRequest.setEntity(entity);
|
||||
HttpResponse response=httpClient.execute(postRequest);
|
||||
System.out.println(IOUtils.toString(response.getEntity().getContent()));
|
||||
```
|
||||
|
||||
* `javascript`
|
||||
* `JavaScript`
|
||||
|
||||
```javascript
|
||||
var myHeaders = new Headers();
|
||||
|
|
@ -48,4 +48,4 @@ fetch("http://localhost:8080", requestOptions)
|
|||
.then(response => response.text())
|
||||
.then(result => console.log(result))
|
||||
.catch(error => console.log('error', error));
|
||||
```
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue