Jump to content
Sign in to follow this  
mvanrijnen

Resource works in CMD not in ISAPI

Recommended Posts


I have a simple resource.

Unit filename: Resource.Company.WebHookReceiver.pas

 


type
  [Path('CompanyWebhookReceiver')]
  TCompanyWebhookReceiver = class

  public

   [Post, Consumes(TMediaType.APPLICATION_JSON)]
    function Bucket([BodyParam] body : string): string;

 end;

    {$IFDEF DEBUG}
    [Get, Produces(TMediaType.APPLICATION_JSON)]
    function BucketGet([BodyParam] body : string): string;
    {$ENDIF}

(in the get i call the same methods as in the post, this is for debugging purposes)

 

When i use this in the cmd bootstrap it works, i call it by: http://localhost:8099/rest/default/CompanyWebhookReceiver/

I get the result i want.


 

Then i use the same units in the ISAPI bootstrap, i call it then by: http://localhost:8085/company/WebHookReceiver_ISAPI.dll/rest/default/CompanyWebhookReceiver/

Result:
Resource [CompanyWebhookReceiver] not found

 

What am i doing wrong?
 

 

[edit]

In the Server.ignition.pas i have the following line:


    // Application configuration
    FEngine.AddApplication('DefaultApp', '/default', ['Resource.Company.*']);

 

[edit2]

I put an output to file in the initialization section of the resources unit, and the text is written.

 

Edited by mvanrijnen

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×