Send to server(Ajax)

Sending data to server is a must in every web applications and we have created a simple way to do that using Ajax.

Only POST method support now.

Usage

Here is sample usage;

server({
    url: "https://example.com/server",
    data: {
        name: "John Doe",
        email: "john@example.com",
        phone: "1223455"
    },
    loader: true
});

Parameters

This function has only one object parameter that is required

Parameter

Required

Type

Description

url

Yes

string

The url to send data.

data

Yes

object

An object with your data.

loader

No

boolean

whether to show loader while sending data or not.

Response

Responses should be JSON, please refer to the server response page for more information.

Server Responses

Last updated