Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 822 Bytes

encode.md

File metadata and controls

39 lines (26 loc) · 822 Bytes

java-caesar-cipher / encode

Encode a chain of chars using caesar cipher.

  • URL

    <host>:<port>/cipher/v1/encode

  • Method:

    POST

  • Data Params

    { "numberShift": int, "cipher": "string" }

  • Success Response:

    • Code: 200
      Content: { encoded : 5, name : "i walked alone at the night, and sang a reggae for lonely street dogs." }
  • Error Response:

    • Code: 400 BAD REQUEST
      Content: { "timestamp" : "1587772800", "status": "400", "message": "the explained error message" }
  • Sample Call:

      $.ajax({
        url: "/cipher/v1/encode",
        data: "{ \"numberShift\": int, \"cipher\": \"string\" }"
        dataType: "json",
        type : "POST",
        success : function(r) {
          console.log(r);
        }
      });