@@ -278,7 +278,7 @@ module PostHog
278278
279279 stub_request (
280280 :get ,
281- 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
281+ 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
282282 ) . to_return ( status : 200 , body : api_feature_flag_res . to_json )
283283 stub_request ( :post , flags_endpoint )
284284 . to_return ( status : 200 , body : flags_response . to_json )
@@ -323,7 +323,7 @@ module PostHog
323323
324324 stub_request (
325325 :get ,
326- 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
326+ 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
327327 ) . to_return ( status : 200 , body : api_feature_flag_res . to_json )
328328 stub_request ( :post , flags_endpoint )
329329 . to_return ( status : 200 , body : flags_response . to_json )
@@ -348,7 +348,7 @@ module PostHog
348348 'off-feature' => false } }
349349 stub_request (
350350 :get ,
351- 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
351+ 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
352352 ) . to_return ( status : 200 , body : { } . to_json )
353353 stub_request ( :post , flags_endpoint )
354354 . to_return ( status : 200 , body : flags_response . to_json )
@@ -373,7 +373,7 @@ module PostHog
373373
374374 stub_request (
375375 :get ,
376- 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
376+ 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
377377 ) . to_return ( status : 401 , body : { 'error' => 'not authorized' } . to_json )
378378 stub_request ( :post , flags_endpoint )
379379 . to_return ( status : 200 , body : flags_response . to_json )
@@ -390,7 +390,7 @@ module PostHog
390390 expect ( properties [ '$feature/beta-feature' ] ) . to eq ( 'random-variant' )
391391 expect ( properties [ '$active_feature_flags' ] ) . to eq ( [ 'beta-feature' ] )
392392
393- assert_not_requested :get , 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
393+ assert_not_requested :get , 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
394394 end
395395
396396 it 'manages memory well when sending feature flags' do
@@ -414,7 +414,7 @@ module PostHog
414414 }
415415 stub_request (
416416 :get ,
417- 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
417+ 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
418418 ) . to_return ( status : 200 , body : api_feature_flag_res . to_json )
419419
420420 stub_const ( 'PostHog::Defaults::MAX_HASH_SIZE' , 10 )
@@ -482,7 +482,7 @@ module PostHog
482482
483483 stub_request (
484484 :get ,
485- 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
485+ 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
486486 ) . to_return ( status : 200 , body : api_feature_flag_res . to_json )
487487
488488 stub_const ( 'PostHog::Defaults::MAX_HASH_SIZE' , 10 )
@@ -639,7 +639,7 @@ module PostHog
639639
640640 stub_request (
641641 :get ,
642- 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
642+ 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
643643 ) . to_return ( status : 200 , body : api_feature_flag_res . to_json )
644644 stub_request ( :post , flags_endpoint )
645645 . to_return ( status : 200 , body : flags_response . to_json )
@@ -677,7 +677,7 @@ module PostHog
677677
678678 stub_request (
679679 :get ,
680- 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
680+ 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
681681 ) . to_return ( status : 200 , body : api_feature_flag_res . to_json )
682682 stub_request ( :post , flags_endpoint )
683683 . to_return ( status : 200 , body : flags_response . to_json )
@@ -703,7 +703,7 @@ module PostHog
703703 it 'ignores feature flags with invalid send_feature_flags parameter' do
704704 stub_request (
705705 :get ,
706- 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
706+ 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
707707 ) . to_return ( status : 200 , body : { flags : [ ] } . to_json )
708708 c = Client . new ( api_key : API_KEY , personal_api_key : API_KEY , test_mode : true )
709709
@@ -741,7 +741,7 @@ module PostHog
741741 }
742742 stub_request (
743743 :get ,
744- 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
744+ 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
745745 ) . to_return ( status : 200 , body : api_feature_flag_res . to_json )
746746
747747 # This should NOT be called because only_evaluate_locally is true
@@ -793,7 +793,7 @@ module PostHog
793793 }
794794 stub_request (
795795 :get ,
796- 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
796+ 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
797797 ) . to_return ( status : 200 , body : api_feature_flag_res . to_json )
798798
799799 # This should NOT be called because only_evaluate_locally is true
@@ -844,7 +844,7 @@ module PostHog
844844 }
845845 stub_request (
846846 :get ,
847- 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
847+ 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
848848 ) . to_return ( status : 200 , body : api_feature_flag_res . to_json )
849849
850850 # This SHOULD be called because only_evaluate_locally is explicitly false
@@ -1186,7 +1186,7 @@ def run
11861186 # Mock response for api/feature_flag
11871187 stub_request (
11881188 :get ,
1189- 'https://us.i.posthog.com/api/feature_flag/local_evaluation ?token=testsecret&send_cohorts=true'
1189+ 'https://us.i.posthog.com/flags/definitions ?token=testsecret&send_cohorts=true'
11901190 ) . to_return ( status : 200 , body : api_feature_flag_res . to_json )
11911191
11921192 # Mock response for `/flags`
0 commit comments