brody
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # API 문서에 표시된 다양한 매개변수를 적용하여 호출 결과를 확인해봅니다 ![](https://i.imgur.com/d8F3Krv.png) ### Postman이 우리를 대신해서 만들어준 URL의 모습은 결과적으로 어떘나요? - 프로토콜 + Host + 자원경로 + API키 + 추가필터링 쿼리 - Postman에 Query Params의 Key값과 Value값을 넣어주면 자동으로 URL에 추가해준다. ### URL에서 매개변수는 어떻게 표현하나요? - URL + ? + 매개변수=값 + & + 매개변수=값 + & 매개변수(default값) + ... # Request - HTTP 요청의 핵심요소에 대해서 알아봅시다. ## method GET: 리소스 조회 (최근에는 Representation이라는 이름을 많이 사용한다.) POST: 요청 데이터 처리, 주로 등록에 사용 PUT: 리소스를 대체, 해당 리소스가 없으면 생성 PATCH: 리소스 부분 변경 DELETE: 리소스 삭제 ### GET 은 언제 어떻게 사용하나요? - 서버에게 resource를 보내달라고 요청합니다. - query String을 통해 필터링된 정보를 받을 수 있습니다. ### POST 는 언제 어떻게 사용하나요? - 서버에게 resource를 보내면서 생성해 달라고 요청합니다. - 주소창에 파라미터를 노출하는 것을 피할 때 사용하며, 요청 Body에 데이터를 넣어 전송합니다. ### PUT 은 언제 어떻게 사용하나요? - 서버에게 resource의 업데이트 하거나 resource가 없다면 새로운 resource를 생성해 달라고 요청합니다. 회원정보 수정 등에 사용됩니다. - PUT은 내부의 값 중 하나만 업데이트하더라도 항상 모든 필드값을 가져와서 모든 필드를 항상 새로운 값으로 교체합니다. ### PATCH 는 언제 어떻게 사용하나요? - 서버에게resource의 업데이트를 요청합니다. 회원정보 수정 등에 사용됩니다. - PATCH는 내부의 값 중 업데이트한 해당 부분만 업데이트 합니다. ### DELETE 는 언제 어떻게 사용하나요? - 서버에게 resource의 삭제를 요청합니다. ## 위의 질문들을 올바르게 살펴봤다면, 아래의 내용들이 무엇인지 설명할 수 있습니다. ### request-query - get요청을 할 때 필터링된 정보를 받을 때 사용한다. ### request-body(payload) - 사용자의 정보를 서버로 보낼때는 주소창에 노출시키지않기 위해 post의 request-body에 정보를 넣어 요청한다. 이 곳에는 주로 JSON이 들어간다. ### header - 서버에 전달되는 사용자 정보(브라우저, 언어, 파일 종류 등)가 존재한다. - 인증과 권한부여의 목적으로 사용된다. header가 존재하지않는다면 악의적인 유저로부터 데이터를 보호할 수 없을 것이다. ### Content-Type 은 무엇인가요? - Http 통신에서 전송되는 데이터의 타입을 명시하기 위해 header에 실리는 정보다. - 타입 종류에는 Multipart Related MIME, XML Media, Application, TEXT 등이 존재한다. ### 파일을 전송할때 주로 사용하는 Content-Type 은 무엇인가요? - 미디어 유형 ( Multipurpose Internet Mail Extensions 또는 MIME 유형 이라고도 함)을 사용한다. 이미지나 동영상 등의 바이너리 파일들이 이에 해당한다. # Response - HTTP 응답의 핵심요소에 대해서 알아봅시다. ## HTTP Status ### 200, 201 , 202, 204 상태 코드가 각각 무엇을 의미하는지 알아봅시다. - 200 : OK - 오류 없이 전송 성공. - 201 : Created - 요청이 성공적으로 처리되었으며, 자원이 생성되었음을 나타내는 성공 상태 응답 코드. - 202 : Accepted - 서버가 클라이언트의 요청을 수락함. - 204 : Non Content - 클라이언트의 요구를 처리했으나 전송할 데이터가 없음. ### 400 , 401 , 403 , 404 , 406 상태 코드가 각각 무엇을 의미하는지 알아봅시다. - 400 : Bad Request - 요청 실패. 문법상 오류가 있어서 서버가 요청사항을 이해하지 못함 - 401 : Unauthorized - 클라이언트가 인증되지 않았거나, 유효한 인증 정보가 부족하여 요청이 거부되었음을 의미하는 상태값 - 403 : Forbidden - 서버가 해당 요청을 이해했지만, 권한이 없어 요청이 거부되었음을 의미하는 상태값 - 404 : Not Found - 문서를 찾을 수 없음. 서버가 요청한 파일이나 스크립트를 찾지 못함. - 406 : Not Acceptable - 받아들일 수 없음. ### 500 , 502 , 504 상태 코드가 각각 무엇을 의미하는지 알아봅시다. - 500 : Internal Server Error - 서버 내부 오류. - 502 : Bad gateway - 게이트웨이 상태 나쁨. - 504 : Gateway timeout - 프록시나 게이트웨이의 역할을 하는 서버에서 볼 수 있음. 초기 서버가 원격 서버로부터 응답을 받을 수 없음. ## 위의 질문들을 올바르게 살펴봤다면, 아래의 내용들이 무엇인지 설명할 수 있습니다. ### 가장 기본적인 성공 요청 응답의 status 코드는 무엇일까요? - 200 ### 인증 또는 권한등의 오류에 대해서 주로 사용되는 status 코드는 무엇일까요? - 401, 403 ### 잘못된 접근, 존재하지 않는 경로에 대한 접근에 주로사용되는 status 코드는 무엇일까요? - 404 ### 서버측 오류에 대해서 주로 사용되는 status 코드는 무엇일까요? - 500 ### status 를 통해서 얻을수 있는 이점은 무엇일까요? - 요청과 응답 사이의 코드만 보고 현재 상황이 어떤지 확인할 수 있다. # URL / URI ### URL 과 URI에 대해서 알아봅시다. - URI : URI는 특정 리소스를 식별하는 통합 자원 식별자(Uniform Resource Identifier)를 의미한다. 웹 기술에서 사용하는 논리적 또는 물리적 리소스를 식별하는 고유한 문자열 시퀀스다. - URL : URL은 흔히 웹 주소라고도 하며, 컴퓨터 네트워크 상에서 리소스가 어디 있는지 알려주기 위한 규약이다. URI의 서브셋이다. <img src = "https://www.charlezz.com/wordpress/wp-content/uploads/2021/02/www.charlezz.com-uri-url-uri-url.png" width="300"> - URI는 식별하고, URL은 위치를 가르킨다. <br> <br> [URI랑 URL 차이점이 뭔데?](https://www.charlezz.com/?p=44767) [HTTP - 위키백과](https://ko.wikipedia.org/wiki/HTTP)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully