Commit e7b2ff9
feat: add User-Agent header with SDK version
- Add user_agent/0 function to dynamically retrieve SDK version from Application.spec
- Format: flagsmith-elixir-sdk/<version> or flagsmith-elixir-sdk/unknown as fallback
- Add user_agent_middleware/0 to inject User-Agent header in all HTTP requests
- Add comprehensive tests with semver validation using Version.parse/1
- Follows the pattern established in Go and Java Flagsmith SDKs
Co-authored-by: Claude Code <[email protected]>1 parent 587d126 commit e7b2ff9
2 files changed
+47
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
11 | 20 | | |
12 | 21 | | |
13 | 22 | | |
| |||
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
| 43 | + | |
34 | 44 | | |
35 | 45 | | |
36 | 46 | | |
| |||
394 | 404 | | |
395 | 405 | | |
396 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
397 | 413 | | |
398 | 414 | | |
399 | 415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
440 | 471 | | |
0 commit comments