ga-wdi-boston / jquery-ajax-diagnostic

Other
0 stars 144 forks source link

max response #121

Closed doremaxime closed 7 years ago

doremaxime commented 7 years ago

Comfort: 4 Clarity: 4

I used class notes. Wasn't too sure about the "Please do not use data = getFormFields(form) instead write out the data object."

doremaxime commented 7 years ago

Ben,

I thought the instructions were to include those headers no? "include HTTP headers in its output."

Max WDI 16

On Mon, Jan 23, 2017 at 12:32 PM, Ben Adamski notifications@github.com wrote:

@BenGitsCode commented on this pull request.

7/10 great job! 👍

In diagnostic.md https://github.com/ga-wdi-boston/jquery-ajax-diagnostic/pull/121#pullrequestreview-17978204 :

@@ -21,13 +21,19 @@ Write the curl request you'd use to retrieve a list of all donuts on the server.

-# your answer here
+curl --include --request GET http://www.example.com/donuts \
+--header "Content-Type: application/json"

no need for header here.

In diagnostic.md https://github.com/ga-wdi-boston/jquery-ajax-diagnostic/pull/121#pullrequestreview-17978204 :

@@ -36,13 +42,19 @@ Now, we want to get a single donut from the server. Write the curl request you'd use to retrieve a single donut, using whatever ID you'd like.

-# your answer here
+curl --include --request GET http://www.example.com/donuts/4 \
+--header "Content-Type: application/json"

same with header.

In diagnostic.md https://github.com/ga-wdi-boston/jquery-ajax-diagnostic/pull/121#pullrequestreview-17978204 :

@@ -51,13 +63,19 @@ Write the curl request you'd use to delete a single donut, using whatever ID you'd like.

-# your answer here
+curl --include --request DELETE "http://www.example.com/donuts/4" \
+--header "Content-Type: application/json"

still no header needed.
------------------------------

In diagnostic.md
<https://github.com/ga-wdi-boston/jquery-ajax-diagnostic/pull/121#pullrequestreview-17978204>
:

>  ```

 Write an AJAX request to create a single donut on the server using JSON. Please
 do not use `data = getFormFields(form)` instead write out the data object.

 ```js
-let createDonut = /* your answer here */;
+let createDonut = function(data){
+  return $.ajax({
+    url: http://www.example.com + '/donuts/',
+    method: 'POST',
+    data,
+  });
+};;

Data is not defined.

let createDonut = function () { return $.ajax({ url: 'http://example.com/donuts', method: 'POST', data: { "donut" { "name": "French Cruller", "price": "$0.99" } } }); };


In diagnostic.md https://github.com/ga-wdi-boston/jquery-ajax-diagnostic/pull/121#pullrequestreview-17978204 :

Write an AJAX request to change the donut on the server using JSON.

-let changeDonut = /* your answer here */;
+let changeDonut = function(id, data){
+  return $.ajax({
+    url: http://www.example.com + '/donuts/' + id,
+    method: 'PATCH',
+    data,
+  });
+};;

data is not defined.

let changeDonut = function (donutID) { return $.ajax({ url: 'http://example.com/donuts/' + donutID, method: 'PATCH', data: { "donut" { "name": "Krüller", } } }); };

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ga-wdi-boston/jquery-ajax-diagnostic/pull/121#pullrequestreview-17978204, or mute the thread https://github.com/notifications/unsubscribe-auth/AXd9LYnTQmZCw6_k6FskzKWMBFOeZdsEks5rVOQogaJpZM4LrGTq .

BenGitsCode commented 7 years ago

You're right, our solutions don't include any but the instructions do say to include them. I'll revise the score with that in mind. Thanks for the feedback!