"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "helpers/codegen/generators/java-unirest.js" between
hoppscotch-2.0.0.tar.gz and hoppscotch-2.1.0.tar.gz

About: Hoppscotch is a light-weight, web based API development suite.

java-unirest.js  (hoppscotch-2.0.0):java-unirest.js  (hoppscotch-2.1.0)
skipping to change at line 35 skipping to change at line 35
{ verb: "POST", unirestMethod: "post" }, { verb: "POST", unirestMethod: "post" },
{ verb: "PUT", unirestMethod: "put" }, { verb: "PUT", unirestMethod: "put" },
{ verb: "PATCH", unirestMethod: "patch" }, { verb: "PATCH", unirestMethod: "patch" },
{ verb: "DELETE", unirestMethod: "delete" }, { verb: "DELETE", unirestMethod: "delete" },
{ verb: "HEAD", unirestMethod: "head" }, { verb: "HEAD", unirestMethod: "head" },
{ verb: "OPTIONS", unirestMethod: "options" }, { verb: "OPTIONS", unirestMethod: "options" },
] ]
// create client and request // create client and request
const verb = verbs.find((v) => v.verb === method) const verb = verbs.find((v) => v.verb === method)
requestString.push( requestString.push(
`HttpResponse<String> response = Unirest.${verb.unirestMethod}("${url}${pa thName}${queryString}")\n` `HttpResponse<String> response = Unirest.${verb.unirestMethod}("${url}${pa thName}?${queryString}")\n`
) )
if (auth === "Basic Auth") { if (auth === "Basic Auth") {
const basic = `${httpUser}:${httpPassword}` const basic = `${httpUser}:${httpPassword}`
requestString.push( requestString.push(
`.header("authorization", "Basic ${window.btoa( `.header("authorization", "Basic ${window.btoa(
unescape(encodeURIComponent(basic)) unescape(encodeURIComponent(basic))
)}") \n` )}") \n`
) )
} else if (auth === "Bearer Token" || auth === "OAuth 2.0") { } else if (auth === "Bearer Token" || auth === "OAuth 2.0") {
requestString.push(`.header("authorization", "Bearer ${bearerToken}") \n`) requestString.push(`.header("authorization", "Bearer ${bearerToken}") \n`)
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)