Skip to content

Commit

Permalink
add SDK+version to cohort request headers
Browse files Browse the repository at this point in the history
  • Loading branch information
tyiuhc committed Aug 7, 2024
1 parent 8d77c7c commit 564bea1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/experiment/cohort/cohort_download_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module AmplitudeExperiment
class CohortDownloadApi
COHORT_REQUEST_TIMEOUT_MILLIS = 5000
COHORT_REQUEST_RETRY_DELAY_MILLIS = 100

def get_cohort(cohort_id, cohort = nil)
raise NotImplementedError
end
Expand Down Expand Up @@ -70,7 +71,8 @@ def get_cohort(cohort_id, cohort = nil)
def get_cohort_members_request(cohort_id, last_modified)
headers = {
'Authorization' => "Basic #{basic_auth}",
'Content-Type' => 'application/json;charset=utf-8'
'Content-Type' => 'application/json;charset=utf-8',
'X-Amp-Exp-Library' => "experiment-ruby-server/#{VERSION}"
}
url = "#{@server_url}/sdk/v1/cohort/#{cohort_id}?maxCohortSize=#{@max_cohort_size}"
url += "&lastModified=#{last_modified}" if last_modified
Expand Down

0 comments on commit 564bea1

Please sign in to comment.