OFREP Protocol
Use Flipswitch with any language via the OpenFeature Remote Evaluation Protocol
Flipswitch natively implements the OpenFeature Remote Evaluation Protocol (OFREP), so any language with an OpenFeature SDK and OFREP provider works directly — no custom integration needed.
Browse the full OpenFeature ecosystem for available SDKs and providers.
OFREP providers use polling for flag updates. For real-time SSE streaming, use an official Flipswitch SDK where available.
Supported Languages
.NET
ASP.NET, server-side
Rust
Tokio, Axum, server-side
Swift
iOS, macOS
PHP
Laravel, server-side
Ruby
Rails, server-side
Any language with an OpenFeature SDK and OFREP provider can connect to Flipswitch. If your language isn't listed above, check the OpenFeature ecosystem or use the direct HTTP API below.
Direct OFREP API
You can also call the OFREP endpoints directly via HTTP — useful for scripting, testing, or languages without an OFREP provider yet.
Single Flag Evaluation
curl -X POST https://api.flipswitch.io/ofrep/v1/evaluate/flags/dark-mode \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"context": {
"targetingKey": "user-123",
"email": "user@example.com"
}
}'Response:
{
"key": "dark-mode",
"value": true,
"variant": "enabled",
"reason": "TARGETING_MATCH"
}Bulk Evaluation
curl -X POST https://api.flipswitch.io/ofrep/v1/evaluate/flags \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"context": {"targetingKey": "user-123"}}'Response:
{
"flags": [
{"key": "dark-mode", "value": true, "variant": "enabled", "reason": "TARGETING_MATCH"},
{"key": "max-items", "value": 50, "variant": "high", "reason": "DEFAULT"}
]
}ETag Support
Use ETags for efficient caching:
# First request returns ETag header
curl -X POST https://api.flipswitch.io/ofrep/v1/evaluate/flags \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"context": {"targetingKey": "user-123"}}'
# Response includes: ETag: "abc123"
# Subsequent requests with If-None-Match
curl -X POST https://api.flipswitch.io/ofrep/v1/evaluate/flags \
-H "X-API-Key: YOUR_API_KEY" \
-H 'If-None-Match: "abc123"' \
-d '{"context": {"targetingKey": "user-123"}}'
# Returns 304 Not Modified if unchangedAll Supported Languages
| Language | OpenFeature SDK | OFREP Provider |
|---|---|---|
| .NET | dotnet-sdk | dotnet-sdk-contrib |
| Rust | rust-sdk | rust-sdk-contrib |
| Swift | swift-sdk | ofrep-swift-client-provider |
| PHP | php-sdk | php-sdk-contrib |
| Ruby | ruby-sdk | ruby-sdk-contrib |
For the latest SDKs and providers, see the OpenFeature ecosystem and the OFREP protocol spec.