Started adding features for submitting a request to server

This commit is contained in:
2017-06-04 00:07:23 +02:00
parent 9d29482857
commit 27edd29bd2
2 changed files with 4 additions and 2 deletions

View File

@@ -16,7 +16,9 @@ class MovieObject {
}
requestMovie(id) {
console.log(id);
fetch('http://localhost:31459/api/v1/plex/request/' + id, {
method: 'POST'
})
}
getElement() {

View File

@@ -58,7 +58,7 @@ class SearchRequest extends React.Component {
<input
type="text"
onKeyPress={(event) => this._handleKeyPress(event)}
onChange={event => this.handleChange(event)}
onChange={(event) => this.handleChange(event)}
value={this.state.searchQuery}
/>
<button onClick={() => this.fetchQuery()}>Search</button>