There is great website that serves dummy JSON data. This is there f...

  1. Home
  2. Homework Library
  3. Computer Science
  4. Linux
  5. There is great website that serves dummy JSON data. This is there f...

QuestionQuestion

There is great website that serves dummy JSON data. This is there for people who are learning to use cURL ( and related tools ).

use curl to download the json from here:

https://jsonplaceholder.typicode.com/users/1/posts

Problem 2
The above command performs a GET request. You can also perform a POST request.

curl -X POST \
      --header "Content-Type: application/json" \
      -d'{"userId": 10222, "id": 0, "title": "helloWorld", "body": "this is a body"}' \
      jsonplaceholder.typicode.com/posts

Create 4 different POST requests, changing the userId, id, title, and body in each. Verify that the userId, title, and body all change, but API doesn't ever update the id.

Problem 3
Run the command from problem 2 again, but this time supply the --verbose flag to curl. In the output you will find a line indicating the "charset" that curl is sending data in. What is the name of the charset?

Problem 5
What happens if you change the content-type to 'application/txt' in the header from the command in Problem 2?

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

    By purchasing this solution you'll be able to access the following files:
    Solution.docx.

    $10.00
    for this solution

    PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

    Find A Tutor

    View available Linux Tutors

    Get College Homework Help.

    Are you sure you don't want to upload any files?

    Fast tutor response requires as much info as possible.

    Decision:
    Upload a file
    Continue without uploading

    SUBMIT YOUR HOMEWORK
    We couldn't find that subject.
    Please select the best match from the list below.

    We'll send you an email right away. If it's not in your inbox, check your spam folder.

    • 1
    • 2
    • 3
    Live Chats