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

[ISSUE-8] - Add support for PUT and DELETE http methods #9

Merged
merged 3 commits into from
Dec 28, 2016

Conversation

ericdallo
Copy link
Contributor

@ericdallo ericdallo commented Dec 5, 2016

👍 @diegocesar

ISSUE: #8

Allow use of ajax requests:

ajax.put(...);
ajax.delete(...);

@FernandaBernardo
Copy link
Contributor

FernandaBernardo commented Dec 5, 2016

I was thinking, I know there seems to be no point in creating a test for PUT and DELETE. But it's a bit strange to create two new methods without any testing. I think it would be worth thinking or asking someone if they would have a way to test this.

One suggestion: make dynamic tests to accept POST, PUT and DELETE in similar way avoiding code duplication.

@FernandaBernardo @adolfoweloy

`.delete(url, data [,callbacks] [,config])`

###### Description:
Exeutes an ajax request using `delete` http method.
Copy link
Contributor

@FernandaBernardo FernandaBernardo Dec 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo here: exeCutes

@FernandaBernardo @adolfoweloy

`.put(url, data [,callbacks] [,config])`

###### Description:
Exeutes an ajax request using `put` http method.
Copy link
Contributor

@FernandaBernardo FernandaBernardo Dec 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo here: exeCutes

@FernandaBernardo @adolfoweloy

@@ -127,7 +125,7 @@ define("ajax", [], function() {
configHeaders["X-Requested-With"] = configHeaders["X-Requested-With"] || "XMLHttpRequest";
}

if (method === POST) {
if (method != GET) {
Copy link
Contributor

@FernandaBernardo FernandaBernardo Dec 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about to use !==?

@FernandaBernardo @adolfoweloy

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

Successfully merging this pull request may close these issues.

None yet

3 participants