<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: SAP BAS CAPM debugging via request.https in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/sap-bas-capm-debugging-via-request-https/qaa-p/12607194#M4728403</link>
    <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;amitavghose&lt;/SPAN&gt; do you still have this problem? I assume you are using Business Application Studio? Did you enable the forwarding of the localhost to the external address? &lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2022 18:57:23 GMT</pubDate>
    <dc:creator>martinstenzig</dc:creator>
    <dc:date>2022-06-07T18:57:23Z</dc:date>
    <item>
      <title>SAP BAS CAPM debugging via request.https</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-bas-capm-debugging-via-request-https/qaq-p/12607191</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;
  &lt;P&gt;In my CAPM Project leveraging sqlite db ,i have implemented UPDATE statement but somehow below (Myservice.js) one is not working. Hence i try to debug this in SAP BAS using request.https script file - I clicked on Send Request(in script file) its showing error "Header name must be a valid HTTP token ["post https"]". &lt;/P&gt;
  &lt;P&gt;So can you please help me on this.&lt;/P&gt;
  &lt;P&gt;request.https:&lt;/P&gt;
  &lt;P&gt;Send Request&lt;/P&gt;
  &lt;P&gt;POST &lt;A href="https://port4004-workspaces-ws-6hqg8.us10.trial.applicationstudio.cloud.sap/srv/CatalogService/Category" target="test_blank"&gt;https://port4004-workspaces-ws-6hqg8.us10.trial.applicationstudio.cloud.sap/srv/CatalogService/Category&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;Content-Type: application/json &lt;BR /&gt; &lt;BR /&gt; { "ID":3, "PRODUCTID": 3, "PRODUCTNAME": "Aniseed Syrup", "QUANTITYPERUNIT": "12 - 550 ml bottles", "UNITPRICE": 10, "UNITSINSTOCK": 15, "UNITS":15 } &lt;BR /&gt; &lt;/P&gt;
  &lt;P&gt;Myservice.js:&lt;/P&gt;
  &lt;P&gt;module.exports = (srv) =&amp;gt; { &lt;BR /&gt; const {Product} = cds.entities ('my.product') srv.before ('UPDATE', 'Category', async (req) =&amp;gt; { const category = req.data if (!category.UNITS || category.UNITS &amp;lt;= 0) return req.error (400, 'Units in stock should be greater than zero') const tx = cds.transaction(req) const affectedRows = await tx.run ( UPDATE (Product) .set ({ UNITSINSTOCK : {'=': category.UNITS }}) .where ({ PRODUCTID: {'=': category.PRODUCTID}}) ) if (affectedRows === 0) req.error (409, "No Product available, sorry") }) &lt;BR /&gt; }&lt;/P&gt;
  &lt;P&gt;Myservice.cds:using {my.product as my } from '../db/product';@path: 'srv/CatalogService'service MyService { entity Product as projection on my.Product; entity Category @updateonly as projection on my.Category;}&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 08:36:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-bas-capm-debugging-via-request-https/qaq-p/12607191</guid>
      <dc:creator>former_member150478</dc:creator>
      <dc:date>2022-06-01T08:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAP BAS CAPM debugging via request.https</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-bas-capm-debugging-via-request-https/qaa-p/12607192#M4728401</link>
      <description>&lt;P&gt;I tried to reproduce your problem. It seems like you explicitly have the "Send Request" as string in your file. You need to take that out. The tooling (rest client) will show "Send Request" hovering above your HTTP request. Once you click on that you get the proper behavior. I tried your URL, but received a 404&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 05:36:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-bas-capm-debugging-via-request-https/qaa-p/12607192#M4728401</guid>
      <dc:creator>martinstenzig</dc:creator>
      <dc:date>2022-06-02T05:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAP BAS CAPM debugging via request.https</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-bas-capm-debugging-via-request-https/qaa-p/12607193#M4728402</link>
      <description>&lt;P&gt;Thanks Martin now i able to Send Request.&lt;/P&gt;&lt;P&gt;Facing one more issue , when i send the request - am getting response as attached , due to this i unable to debug. Can you please help to fix this one also.&lt;/P&gt;&lt;P&gt;HTTP/1.1 401 Unauthorised&lt;/P&gt;&lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/2057452-responseissue.png" data-attachment="2057452"&gt;responseissue.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 06:39:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-bas-capm-debugging-via-request-https/qaa-p/12607193#M4728402</guid>
      <dc:creator>former_member150478</dc:creator>
      <dc:date>2022-06-02T06:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAP BAS CAPM debugging via request.https</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-bas-capm-debugging-via-request-https/qaa-p/12607194#M4728403</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;amitavghose&lt;/SPAN&gt; do you still have this problem? I assume you are using Business Application Studio? Did you enable the forwarding of the localhost to the external address? &lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 18:57:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-bas-capm-debugging-via-request-https/qaa-p/12607194#M4728403</guid>
      <dc:creator>martinstenzig</dc:creator>
      <dc:date>2022-06-07T18:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAP BAS CAPM debugging via request.https</title>
      <link>https://community.sap.com/t5/technology-q-a/sap-bas-capm-debugging-via-request-https/qaa-p/12607195#M4728404</link>
      <description>&lt;P&gt;its resolved Martin.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 11:47:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sap-bas-capm-debugging-via-request-https/qaa-p/12607195#M4728404</guid>
      <dc:creator>former_member150478</dc:creator>
      <dc:date>2022-06-10T11:47:51Z</dc:date>
    </item>
  </channel>
</rss>

