Skip to main content
Solved

HTTP Caller POST request error


bhanu_v
Forum|alt.badge.img

Im trying to work with the Cityworks API to create service requests using FME desktop.

Im using the http caller to create a service request.

so far I have made progress to create a service request and extract the requestId .

My next challenge is to upload an attachment to the service request and this is where Im stuck,

The workspace looks like this ,Im trying to upload an image 0684Q00000ArBaqQAF.png

I tried to put in the parameters that worked in postman as much as I could

0684Q00000ArBxzQAF.png

The sample call from postman and its response are attached here.0684Q00000ArBuIQAV.png

The error message I keep on getting is this


HTTPCaller(HTTPFactory): HTTP/FTP Transfer: Failed to open file '20191009243' for resource upload

I have tried changing the parameters from other posts in the blog ,but in vain

 

Best answer by bhanu_v

With help from @nathanatsafe

I figured out the answer to make a successful POST call

using source dataset parameter for value field in the multipart upload section solved the problem

 

View original
Did this help you find an answer to your question?

6 replies

friesewoudloper
Forum|alt.badge.img

fme_basename doesn't contain a file extension. So may be the name of your file for upload is incomplete? The response body in your Postman screenshot says the file 20191009243 .GIF was uploaded.


bhanu_v
Forum|alt.badge.img
  • Author
  • March 11, 2019
friesewoudloper wrote:

fme_basename doesn't contain a file extension. So may be the name of your file for upload is incomplete? The response body in your Postman screenshot says the file 20191009243 .GIF was uploaded.

Thank you for your reply @friesewoudloper

I have changed the fme_basename to have the filename extension .GIF

but I still get the same error HTTP/FTP failed to open file 20191009243.GIF


friesewoudloper
Forum|alt.badge.img
bhanu_v wrote:

Thank you for your reply @friesewoudloper

I have changed the fme_basename to have the filename extension .GIF

but I still get the same error HTTP/FTP failed to open file 20191009243.GIF

Could you please share with us the screenshot from Postman containing the *request* body? It will make it easier to help you. The screenshot you uploaded only contains the response body.


bhanu_v
Forum|alt.badge.img
  • Author
  • March 11, 2019

I made changes to the workspace

deleted the content-type in the header and chose the actula file from the folder instead of fme_basename and was able to amake succesfull call

however,how do i get the file to be uploaded from the workspace reader than pointing to the actual file


bhanu_v
Forum|alt.badge.img
  • Author
  • March 11, 2019
friesewoudloper wrote:

Could you please share with us the screenshot from Postman containing the *request* body? It will make it easier to help you. The screenshot you uploaded only contains the response body.

I made changes to the workspace

deleted the content-type in the header and chose the actual file from the folder instead of fme_basename and was able to make a successful call

however,how do I get the file to be uploaded from the workspace reader than pointing to the actual file


bhanu_v
Forum|alt.badge.img
  • Author
  • Best Answer
  • March 11, 2019

With help from @nathanatsafe

I figured out the answer to make a successful POST call

using source dataset parameter for value field in the multipart upload section solved the problem

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings