vibe-d / vibe.d

Official vibe.d development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

help on requestHttp

vajrabisj opened this issue · comments

i need to connect one of api on rapidapid, the query is different ie without a '?', so i have to use requestHttp as following:
res=requestHTTP("https://google-search3.p.rapidapi.com",
(scope req){
req.method=HTTPMethod.GET;
req.headers["X-Rapidapi-Key:"]="the key";
req.headers["X-Rapidapi-Host"]="google-search3.p.rapidapi.com";
req.requestURI="/api/v1/news/q="~urlEncode(qry);

user will need to input on the parameter qry.

i dont't know whether the above is right, but after run, it cause a 403 forbidden response. but the key should be ok. so help is highly appreciated on how to amend my code. thanks in advance.

Resolved, due to a ‘:’