web services - REST "POST" method with Lotus Script -


so got project send file via rest specific end point using lotus script ibm domino server. connected endpoint "post" option , selected required content type (text/csv) , i'm receiving response.

the issue having can't send string through , don't know what's problem. other side has crappy admin doesn't understand of questions , info gave me url & content type.

here code connect/select options:

dim httpobject variant set httpobject = createobject("msxml2.serverxmlhttp.6.0") call httpobject.setoption( 2, 13056) call httpobject.open("post", myurl, false) call httpobject.setrequestheader("content-type", "text/csv")  

now send data other side have use this:

call httpobject.send(mystring) 

yet doesn't work , gives me error line: parameter incorrect. however, , not sure if works since admin on other side doesn't know how check it, when try send pure text instead of string don't errors , seems code executes without issues. if method works it's not option since have dynamic data need send can if you've seen issue before or similar. couldn't find solution on internet.

thanks

it looks missing content-length header defines how large data sending body of request.

xmlhttp.setrequestheader "content-length", len(mystring) 

without knowing server doing, it's hard sure what's going on. need admin person send copy of server logs.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -