D
D
Darth Vader2017-05-23 11:24:21
JavaScript
Darth Vader, 2017-05-23 11:24:21

send json via post request?

There is such json

{
  "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36",
  "products": [
    {
      "product_id": "421",
      "product_name": "Elizabeth Knit Top",
      "product_desc": "Loose fitting from the shoulders, open weave knit top. Semi sheer.  Slips on. Faux button closure detail on the back. Linen/Cotton. Machine wash.",
      "product_sku": "wbk012c",
      "product_image": "https://1924magento.triggmine.com.ua/media/catalog/product/cache/1/image/265x/9df78eab33525d08d6e5fb8d27136e95/w/b/wbk012t.jpg",
      "product_url": "https://1924magento.triggmine.com.ua/elizabeth-knit-top-596.html",
      "product_qty": 1,
      "product_price": 210,
      "product_total_val": "210.0000",
      "product_categories": [
        "New Arrivals",
        "Tops & Blouses"
      ]
    }
  ],
  "customer": {
  "device_id": "4c3d48512d48b2603092b5a45ba74c8c",
  "device_id_1": "465060737",
  "customer_id": "980",
  "customer_first_name": "Max",
  "customer_last_name": "Riabchynskyi",
  "customer_email": "[email protected]",
  "customer_date_created": "2016-09-08 10:20:37"
}
}


How can I send such a huge json code with a post request, I looked here api.jquery.com/jquery.post , but did not understand how I can send such a large json

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pashted, 2017-05-23
@blackdarthvader

JSON.stringify
https://learn.javascript.ru/json#serialization-method...

M
M-ka, 2017-05-23
@M-ka

you don’t need to cut the LCD post, but through LCD Ajax, and throw all the information on the date ...
api.jquery.com/jQuery.ajax
do not be too lazy to write your own wrapper for processing send and erors and, in general, sending data

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question