Skip to content
This repository was archived by the owner on Apr 13, 2026. It is now read-only.
This repository was archived by the owner on Apr 13, 2026. It is now read-only.

User-Agent missing in Appsearch #52

@chanwit-sup

Description

@chanwit-sup

How I can put "User-Agent" header data into Appsearch.
I try to edit code in file "client.js" as follows.

  _jsonRequest(method, path, params) {
    return this._wrap({
      method: method,
      url: `${this.baseUrl}${path}`,
      json: params,
      auth: {
        bearer: this.apiKey
      },
      headers: {
        'X-Swiftype-Client': this.clientName,
        'X-Swiftype-Client-Version': this.clientVersion,
        'Content-Type': 'application/json',
        'User-Agent': `${this.clientName} - ${this.clientVersion}`,  // Edit this line
      }
    })
  }

It works but has another solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions