Coder Social home page Coder Social logo

Comments (3)

tparviainen avatar tparviainen commented on June 18, 2024

I just tried exactly the above repro steps and I wasn't able to repro.

Clans API has two GetAsync methods:

Task<SearchResult> GetAsync(QueryClans query);
Task<Clan> GetAsync(string clanTag);

The latter one (GetAsync(string clanTag)) is the one where you provide a clan tag and it gives the clan information. The former one (GetAsync(QueryClans query)) is where you provide a QueryClans object that has properties to filter the search results. If QueryClans is provided empty in API call then Supercell API returns a bad request to caller with next information:

Content: {"reason":"badRequest","message":"At least one filtering parameter must exist"}

That is a valid error because QueryClans must always have at least one filtering criteria defined.

If you could share a sample solution with this problem that I can just open in VS and get into the state, it would be great for investigating.

from clashofclans.

lukeparsons avatar lukeparsons commented on June 18, 2024

Thank you for your reply. Attached is an example project which causes the exception when run.

ConsoleApp.zip

from clashofclans.

tparviainen avatar tparviainen commented on June 18, 2024

Thanks for providing the project to investigate this more. I found the issue causing this behavior. It seems that net461 does not URL encode hash (#) character automatically whereas netcoreapp2.2 implementation of HttpClient will do it.

I changed the implementation of the library to URL encode hash character always and now it seems to work properly also in net461. I will push a commit soon to fix this issue and release 3.0.5 version of the NuGet package with the fix.

Thanks for reporting this issue!

from clashofclans.

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.