Giter Club home page Giter Club logo

Comments (7)

dethi avatar dethi commented on July 21, 2024

Hum.. Have you the log of the request (server side) ?

from algoliasearch-client-swift.

redox avatar redox commented on July 21, 2024

Yes, here it is:

Host: ***********-dsn.algolia.net
Content-Type: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
X-Algolia-API-Key: bd8*************************************************************
X-Algolia-TagFilters: 55e5******************
Accept: */*
User-Agent: Algolia for Swift 1.4.2
X-Algolia-Application-Id: ************
Content-Length: 23
Accept-Language: en-us

It seems the exact same key + same tagFilters (except used with X-Algolia-QueryParameters) is working in JavaScript.

from algoliasearch-client-swift.

dethi avatar dethi commented on July 21, 2024

Are there any special characters in the TagFilters? It's maybe an encoding error.

from algoliasearch-client-swift.

redox avatar redox commented on July 21, 2024

No, seems OK :/

from algoliasearch-client-swift.

dethi avatar dethi commented on July 21, 2024

Does it work if you use X-Algolia-QueryParameters instead of X-Algolia-TagFilters?

client.setExtraHeader("tagFilters=xxxxx", forKey: "X-Algolia-QueryParameters")

from algoliasearch-client-swift.

stephanejais avatar stephanejais commented on July 21, 2024

Not with the swift2 branch.

Here's my code:

    let client = AlgoliaSearch.Client(appID: "xxx", apiKey: "xxx")
    client.setExtraHeader("tagFilters=xxx", forKey: "X-Algolia-QueryParameters")
    let index = client.getIndex("xxx")
    index.search(Query(query:"kate"), block:{result, error in
        print(result, error)
    })

And the output:

nil Optional(Error Domain=Invalid Application-ID or API key Code=403 "(null)")

The exact same code works on master.

from algoliasearch-client-swift.

clement-leprovost avatar clement-leprovost commented on July 21, 2024

Maybe a manifestation of #27.

from algoliasearch-client-swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.