Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST Method #4

Open
CassySpencer opened this issue Apr 25, 2017 · 0 comments
Open

POST Method #4

CassySpencer opened this issue Apr 25, 2017 · 0 comments

Comments

@CassySpencer
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant