Semantic-Org / UI-Search

A search element allows a user to query for results from a selection of data

Home Page:http://semantic-ui.com/modules/search.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

POST Method

CassySpencer opened this issue · comments

I'm new to JavaScript and I was wondering if you can help convert the following GET query to a POST that has a complex JSON Post Payload?

	$(".search").search({
		apiSettings: {
			url: "//api.domain.com/find.py?q={query}"
		},
		fields: {
			results	: "items",
			title	: "name",
			url	: "html_url"
		},
		minCharacters : 3
	});

Here is the type of JSON Post Payload my backend is expecting:

	{
		"query":{
			"title":	"{query}",
			"category":	"magazine"
		},
		"csrf":		"50m3-t0k3n-K3y"
	}

Thank you.