I am using the new OMDB api and want the select requests (including the key) not to be displayed on the client side.
Here is an example of a problem when the user opens the tools dev:
.
I make all my calls in React as follows:
import OmdbKey from './OmdbKey';
populate(keystrokes) {
let query = "http://www.omdbapi.com/?s=";
fetch(query + keystrokes + '&apikey=' + OmdbKey )
.then((response) => {
response.json().then((json) => {
this.setState({ results: json.Search });
});
});
}
Is there a way to do this so that I can hide the key in a GET request? How else should I approach this, if not?
thank
source
share