Advertisement
techblog

duckrails - jscript

Mar 21st, 2022
1,237
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <% sleep 5 %>
  2. <%=
  3.   {
  4.     headers: [
  5.       {name: 'Dynamic-Header', value: SecureRandom.uuid},
  6.       {name: 'Foo-Date', value: Date.today}
  7.     ],
  8.     status_code: @parameters[:whatever].present? ? 200 : 400,
  9.     content_type: @parameters[:format].present? ? "application/#{@parameters[:format]}" : 'text/plain',
  10.     body: '<h1>New response body</h1>'
  11.   }
  12. %>
Advertisement
RAW Paste Data Copied
Advertisement