• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VueJs + CI 4

#5
Thanks for the support.


From postman 



Code:
POST /products HTTP/1.1
Host: vue-ci4.test
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
Postman-Token: 2b815a80-3c3a-40a5-93c4-cdbc49ba085c

title=efefeffejansssssf


In the controller

PHP Code:
  $json $this->request->getJSON();  // tried getJSON(TRUE) as well
 
 return $this->respond($json200); 

is giving an empty result, but I'm not sure if getJSON is going to work with post since the documentation says : [b]Retrieving Raw data (PUT, PATCH, DELETE)

[/b]
PHP Code:
$json $this->request->getRawInput(); 

gives the string back as expacted

PHP Code:
$json $this->request->getPost(TRUE);

return 
$this->respond(array('dwwddw'=>$json), 200); 

As well.

But still, in vue it's only giving me a 404


[Image: screendump.png]
Reply


Messages In This Thread
VueJs + CI 4 - by ponzo - 04-26-2018, 01:54 PM
RE: VueJs + CI 4 - by albertleao - 04-26-2018, 02:43 PM
RE: VueJs + CI 4 - by ponzo - 04-26-2018, 03:00 PM
RE: VueJs + CI 4 - by kilishan - 04-26-2018, 08:32 PM
RE: VueJs + CI 4 - by ponzo - 04-27-2018, 10:43 AM
RE: VueJs + CI 4 - by ponzo - 04-28-2018, 05:34 AM
RE: VueJs + CI 4 - by MGatner - 09-27-2019, 04:59 PM
RE: VueJs + CI 4 - by donpwinston - 09-27-2019, 08:00 PM
RE: VueJs + CI 4 - by kilishan - 09-27-2019, 09:59 PM
RE: VueJs + CI 4 - by MGatner - 09-28-2019, 04:37 AM
RE: VueJs + CI 4 - by dave friend - 09-30-2019, 01:06 PM
RE: VueJs + CI 4 - by MGatner - 09-30-2019, 05:40 PM
RE: VueJs + CI 4 - by dave friend - 10-01-2019, 08:11 AM
RE: VueJs + CI 4 - by MGatner - 10-01-2019, 07:14 PM
RE: VueJs + CI 4 - by Paradinight - 10-02-2019, 06:46 AM
RE: VueJs + CI 4 - by albertleao - 10-02-2019, 07:09 AM
RE: VueJs + CI 4 - by ignitedcms - 10-02-2019, 08:08 AM
RE: VueJs + CI 4 - by MGatner - 10-02-2019, 08:37 AM
RE: VueJs + CI 4 - by albertleao - 10-02-2019, 08:18 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.