Updated to new JS component versions; #153

This commit is contained in:
Philip Helger 2025-09-10 19:38:40 +02:00
parent 1f859bc678
commit 3d783857ab
67 changed files with 555 additions and 236 deletions

View file

@ -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));
```
```