HTTP Post results in error "303 See Other" |
|
Date Entered: 1/26/2005
|
Last Update: 1/26/2005
|
APPLIES TO |
|
|
|
|
SYNOPSIS |
When I post with HTTP (or WebForm, WebUpload, etc), I get an HTTP Protocol error "303 See Other". |
SOLUTION |
This is a code from the server (which you should use standard error handling to trap) that means that the server response to your POST should be retrieved using a GET to a different URL. The URL that you should use will be found in the Location header, which you can get from the Header event of the component. For example:
Private Sub HTTP_Header(...)
If (e.Field.ToUpper() = "LOCATION") Then
newurl = e.Value
End If
End Sub
Try
HTTP.Post("http://server/script.aspx")
Catch ex1 as nsoftware.IPWorks.IPWorksException
If (ex1.Code = 303) Then
HTTP.Get(newurl)
string postresponse = HTTP.TransferredData
End If
End Try
|