Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <Provider store={store}>
  2. <Router history={history}>
  3. <Route path="/" component={home}></Route>
  4. <Route path="page1" component={page1}></Route>
  5. <Route path="page2/:id" component={MigrationProgress}/>
  6. </Router>
  7. </Provider>
  8.  
  9. fetch((Example.url), {
  10. credentials: 'same-origin',
  11. headers: {
  12. "Accept": 'application/json',
  13. "Content-Type": "application/json",
  14. "Authorization": sessionStorage.getItem('token')
  15. }
  16. }).then((response) => {
  17. return response.json();
  18. }).then((responseData) => {
  19. this.setState({
  20. ...
  21. })
  22. });
  23.  
  24. browserHistory.push('/page2/' + uuid)
  25.  
  26. https://localhost:3000/page2/someuuid1234
  27.  
  28. https://localhost:3000/page2/myendpoint
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement