https://rapidapi.com/appsplosionhelp/api/ai-text-to-code-generation/
This api doesn’t use a /get, but it uses a post, so what would I put in the params to access the api.
export const articleApi = createApi({
reducerPath:’articleApi’,
baseQuery:fetchBaseQuery({
baseUrl: ‘https://ai-text-to-code-generation.p.rapidapi.com/’,
prepareHeaders: (headers) => {
headers.set(‘X-RapidAPI-Key’, ‘rapidApiKey’);
headers.set(‘X-RapidAPI-Host’, ‘ai-text-to-code-generation.p.rapidapi.com’);
return headers;
}
}),
endpoints:(builder) => ({
getSummary: builder.query({
query: (params) => 'Generate Code from Natural Language?url=${encodeURIComponent(params.articleUrl)}&length=3'
})
})
});