Eine Plattform viele Schnittstellen
Rest API
// REST API request using Fetch API
fetch('https://api.example.com/users', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer your_token_here'
}
})
.then(response => response.json())
.then(data => {
console.log('User data:', data);
})
.catch(error => {
console.error('Error:', error);
});
SOAP API
<!-- SOAP Request for user data --><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/ soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<GetUserData xmlns="http://example.com/soap">
<UserId>12345</UserId>
</GetUserData>
</soapenv:Body>
</soapenv:Envelope>
GraphQL
// GraphQL query using Fetch API
const query = `
{
user(id: "12345") {
name
email
posts {
title
content
}
}
}`;
fetch('https://api.example.com/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ query })
})
.then(response => response.json())
.then(data => console.log(data));
WebSocket
// WebSocket connection in JavaScript
const socket = new WebSocket('wss://example.com/ws');
socket.onopen = function(event) {
console.log('Connected to WS');
socket.send(JSON.stringify({
message: 'Hello'
}));
};
socket.onmessage = function(event) {
const data = JSON.parse(event.data);
console.log('Received:', data);
};
socket.onclose = function(event) {
console.log('WebSocket closed');
};
Database API
# MySQL database connection in Python
import mysql.connector
conn = mysql.connector.connect(
host="localhost",
user="username",
password="password",
database="test_db"
)
cursor = conn.cursor()
query = "SELECT * FROM users"
cursor.execute(query)
for row in cursor:
print(row)
conn.close()
Divi Pixel Layout Pack
Markus Kopka
Founder & CEO
Syteme verbinden. Workflows automatisieren.
Unlock Limitless Potential with our Comprehensive Development Professional Services. Discover, Innovate, and Thrive Today!
Prozesse, die einfach laufen
Schnittstellen für jeden Bedarf – Plattformen für smarte Prozesse.
Reibungslose Zusammenarbeit
Flexibilität für jedes Unternehmen
Automatisierung für mehr Wachstum
Turning your visions into tangible creations.
