You are not logged in.
Hi ab,
constructor of the TRestClientLibraryRequest, has some questions maybe.
...
aClient := TRestClientLibraryRequest.Create(TOrmModel.Create([]), 'Project2.dll');
...
constructor TRestClientLibraryRequest.Create(aModel: TOrmModel;
const LibraryName: TFileName);
...
call.Init;
InternalUri(call);
if call.OutStatus <> HTTP_NOTFOUND then
begin
@fRequest := nil;
LibraryClose(h);
raise ERestException.CreateUtf8(
'%.Create: % doesn''t export a valid LibraryRequest() function (ret=%)',
[self, LibraryName, call.OutStatus]);
end;
...
end;
if the call.url is nil, the call.OutStatus must be HTTP_NOTFOUND, then raise the exception. There will never be another return value.
I'm not sure if there's something wrong with what I'm using, or this is a bug.
The rest server in dll is a TRestServerFullMemory, just ExportServerGlobalLibraryRequest.
Offline
I don't understand what you mean, sorry.
call.url is nil?Do you mean that HTTP_NOTIMPLEMENTED should be tested instead of HTTP_NOTFOUND?
no,if call.url is null, after InternalUri() the call.OutStatus is HTTP_BADREQUEST.
sorry, i misunderstood before, i thought this code is test to connect the restserver in dll.
if call.OutStatus <> HTTP_BADREQUEST then
This seems right.
Offline