jquery - How do I use Ajax to send to a RESTful API using the data property of Ajax? -


if api this,

/controller/action/var1/something/var2/somethingelse 

and controller expecting data in fashion, how can use data property of ajax send var1 , var2? doesn't use querystring, cannot this,

$.post( "test.php", { name: "john", time: "2pm" } ); 

my rewriterule keeps me doing this,

rewriterule ^(.+)$ index.php?url=$1 [qsa,l] 

it never ? querystring values.

isn't way building url outside of .ajax function first?


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -