Standardized URLs for Web Services
In earlier releases, Jade REST URLs had to be of the following form.
server-name/IIS-app-name/jadehttp.dll/resource.JSON?app-name
In this format:
Entity | Description |
---|---|
server-name | Base part of the URL, which is where to find the IIS; for example, localhost |
IIS-app-name | Name of the application in IIS that links up to the jadehttp.dll; for example, JadeRestSite |
jadehttp.ini | Makes ISAPI-dll in IIS map to jadehttp.dll, which is the handover point from IIS to Jade |
.JSON | Optionally specifies whether the response is formatted in JSON or XML for a GET request (the default value is JSON) |
?app-name | Used to look up the application in the jadehttp.ini file |
In Jade 2022, the following enhancements and suggestions enable you to simplify the Jade REST URL.
Default Application
You can define default application details that are to be used if no application name is specified in the query string in the jadehttp.ini file. This application is defined the same way as any other application, except that the section header is [JadeDefaultApp].
Using HTTP Header instead of .JSON or .XML
Jade REST servers will respect the Content‑Type and Accept headers, so you do not need to include .JSON, .JSONN, or .XML in the URL. If they are included, they will have first priority; otherwise the Accept header will be used to determine the type in which to return serialized objects.
You can also use the Content‑Type header for this purpose and it will be respected, but the Accept header is more correct for specifying the format in which to return the serialized object.
jadehttp.dll not Needed in the URL
Although this is not new to Jade 2022, with a bit of IIS configuration you can rename jadehttp.dll in the URL to whatever you want. IIS needs only to know how to break up the URL into its component parts. For example, in the http://localhost/JadeRestSite/jadehttp.dll/foo?RestApp URL. The first part gets to the IIS; that is, to http//localhost, the second part specifies the web site; that is, /JadeRestSite, and the third part lets IIS know that the jadehttp.dll ISAPI is to be used.
For information about configuring IIS, see "
To rename jadehttp.dll in the IIS configuration
-
To change the jadehttp.dll part of the URL to the name of your choice (for example, to Foobar), you need to change the request path in the Edit Script Map dialog, as shown in the following image.
The new URL would be http://localhost/JadeRestSite/Foobar/foo?RestApp. You can change the Foobar request name to any name that is appropriate for your web service.
For this to work, you need to turn off the request restrictions.
-
Click the Request Restrictions button, to determine if restrictions are set for the request path. The Request Restrictions dialog, shown in the following image, is then displayed.
-
If the Invoke handler only if request is mapped to: check box is checked (that is, set) on the Mapping sheet, uncheck it.
-
Click the OK button. Alternatively, click the Cancel button to abandon the action.
2022.0.01 and higher