Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

run dbsrv12.exe with "D:\demo.db" -n test -x tcp(serverport=2638) -c 512m -ti 3600 -xs http(port=8088)

open web services on tcp port 8088

how i can to open http web services support with CORS

asked 10 Nov '19, 04:08

mfkpie8's gravatar image

mfkpie8
273667075
accept rate: 12%

That's a good question, which is why I upvoted it back to zero :)

I too would like to see sample SQL that implements Cross-origin resource sharing (CORS).

"Using CORS enables a web programmer to use regular XMLHttpRequest . . ."

(11 Nov '19, 04:25) Breck Carter
Replies hidden

maybe he wants to know how to add correct headers to the server response... E.g. this http://dcx.sap.com/sa160/en/dbreference/http-header-function.html

(11 Nov '19, 04:50) Vlad

Well, I don't have samples but v17 seems to have added something here:

Support added for HTTP OPTIONS method

The OPTIONS method is now supported in HTTP web services, stored procedures, and functions. Among other things, this feature allows cross-origin resource sharing (CORS) to be supported by web services. See CREATE SERVICE statement [HTTP web service], CREATE PROCEDURE statement [Web service], and CREATE FUNCTION statement [Web service].

Obviously, if this is required for CORS and was added in v17, it won't help with v12.

(11 Nov '19, 05:06) Volker Barth

At present, there is no budget to purchase the SA 17 version!

(11 Nov '19, 06:36) mfkpie8
Replies hidden

Well, in my limited unstanding, the web server would only need to accept the OPTIONS method if your client tries to use CORS with other methods than GET or HEAD. If requests via GET and HEAD are sufficient, adding the according headers to the response should work with v12, too.

(11 Nov '19, 07:50) Volker Barth

...go ahead, don't be shy, upvote the question :)

(11 Nov '19, 11:36) Breck Carter

Not possible, I had already upvoted, counts are +2/-2=0:)

(11 Nov '19, 11:43) Volker Barth
showing 2 of 7 show all flat view
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×65

question asked: 10 Nov '19, 04:08

question was seen: 5,603 times

last updated: 11 Nov '19, 11:43