Reputation: 1097
I'm using this api: https://api.github.com/search/repositories?sort=stars&order=desc&q=language:C++
to find C++ repositories.
But the return page is all language:C
, Why?
Upvotes: 1
Views: 599
Reputation: 6611
Literal "+" signs in a URL after a "?" query customarily get replaced by SPACE characters. So this would normally get interpreted as "c ". In order to transmit "c++" after a "?", it is safest to type "c%2B%2B".
Upvotes: 0
Reputation: 4883
Lets keep aside about searching a repositories using API's for moment to understanding the expected results
When you search the C++
from github search engine then you will find very less amount of C++
repositories were C
repositories also fetched.
But when you search for cpp
from github search engine then you will get 95% of C++
repositories.
So same will work for API's
. I tested same by API and got expected results.
Upvotes: 3