while using PostRequest_Submit - Got Error (405) Method Not Allowed.

while using PostRequest_Submit - Got Error (405) Method Not Allowed.

  

I am trying to use PostRequest_Submit and send the parameter
URL -http://localhost/TestApplication/admin/Documents/test.pdf ,Arguments="",Timeout=""  & KeepAlive=True
But i got Error "The remote server returned an error: (405) Method Not Allowed."

If i gave the URL as
C:\Program Files\OutSystems\Platform Server\test\TestApplication\admin\Documents\test.pdf
I got Error "The remote server returned an error: (400) Bad Request."

Can you please give a link how to use PostRequest_Submit  or how to solve the above Error.

Thanks
 

Hi Devaraj,

I would assume that indeed you cannot to a submit to an URL which has a PDF file, hence the 405 error. Also, the C:\... URL won't work as well, that's not a valid URL.

What are you trying to achieve? Probably what you would want to do is to add an External Site node in the Screen Flow, link to it and use /TestApplication/etc... as the URL.

Let us know how that goes.

Regards,

Paulo Tavares
Thanks for Your Reply

Actually i studied that when we gave URL to PostRequest_Submit , It Read the Image or Pdf and return as bytes.So i just gave the URL to the PostRequest_Submit .
If i wrong means please give the details of PostRequest_Submit .

Thanks
The PostRequest_Submit action submits an HTTP POST request given the POST arguments and the URL, and returns the request response content as a string and as binary data.

It is not used for you to retrieve the file as bytes, though - at least not in this sense. If you just want to download the PDF, add an External Site node in the Screen Flow, link to it and use /TestApplication/etc... as the URL.

If you want to learn more about it, I encourage you to read more about it in this page: http://www.cs.tut.fi/~jkorpela/forms/methods.html

I hope these help.

Regards,

Paulo Tavares