This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3220: How to add profile

Part Number: CC3220

What should be the URI in ajaxCall function for API GET requests?

For example, I want to run a GET request for __SL_G_N.A. Below is ajaxCall format:

ajaxCall('what should be here?', "GET", "__SL_G_N.A" , response_func);

Thanks,

David

  • HI David,

    I'm not sure the implementation of ajaxCall...
    See http://www.ti.com/lit/swru455 section 8.4

    -Aaron
  • Hi Aaron,

    Seems like section 8.4 is for POST calls, and it well documents the URL that the requst has to be made to. For example, it mentions that for Ping request it should be /api/1/netapp/ping or for IP configuration it should be /api/1/netapp/netcfg_sta, /api/1/netapp/netcfg_sta_ipv6, or /api/1/netapp/netcfg_ap or for WLAN profiles it should be /api/1/wlan/profile_add or /api/1/wlan/profile_p2p.
    However, for GET requests (section 8.5) it doesn't provide that info. For example, I don't know what URL to put for Network Information GET request __SL_G_N.A. Can you help find the corresponding URIs for GET requests?

    Thanks,
    David
  • Also see section 8.5.9 Display Profile Information. A token value may be retrieved by an HTTP GET request whose target is the token name.
  • Hi David 

           You don't need to use ajexcall.

           Simply mention token name in your web page (ex:  __SL_G_N.A) when you enter your local ip address in browser press enter button that time browser send GET request for your server, means token name( __SL_G_N.A) replaced to while loading web page you can see response data.

    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Test</title>
    </head>
    
    <body>	
    IP Address =  __SL_G_N.A
    </body>
    </html>

    Another method for testing.

            open any browser in url field type your local ip and token name

     Ex : 192.168.4.107/__SL_G_N.C