Joe Sansalone
Members-
Content Count
92 -
Joined
-
Last visited
Community Reputation
5 NeutralRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Multipart/form-data vs x-www-form-urlencoded (Indy HTTP server)
Joe Sansalone replied to Joe Sansalone's topic in Network, Cloud and Web
Thank you for the code. I realize that I was doing a quick "custom" version just for text and utf8. (and boundary was the same string always coming from SendGrid). It was my attempt to get something working (my application simply needed some Form-data fields coming in). We are lucky to have you in this forum! I'll try out your code. Thanks. -
Multipart/form-data vs x-www-form-urlencoded (Indy HTTP server)
Joe Sansalone replied to Joe Sansalone's topic in Network, Cloud and Web
I'm simply doing a aRequestInfo.PostStream.Position := 0; StringList.LoadFromStream(aRequestInfo.POstStream, TEncoding.UTF8); to get the content into a string list. Then, I'll be looping through each line of the stringlist looking for Content-Disposition: form-data; name="xxx" and getting the NAME of the parameter (i.e. xxx). Then skipping a line and taking every line until --XYzZY, to get the VALUE of the name parameter. I think it will work for anything without attachments. -
Multipart/form-data vs x-www-form-urlencoded (Indy HTTP server)
Joe Sansalone posted a topic in Network, Cloud and Web
Hi, I have a Indy HTTP server application. Currently receiving requests in the format: application/x-www-form-urlencoded. (everything works fine, I use the parsed params). I'm now also receiving Posts from SendGrid: "the post will be multipart/form-data with the email content URL encoded, but the attachments will be in multipart/form-data". Using the TIdHTTPRequestInfo.PostStream, I'm able to view the payload that they are sending me. 1. Do I need to URLDecode the email content or is it already decoded? 2. Are there any functions/classes to help parse the form-data? it looks like this: --XYzZY Content-Disposition: form-data; name="from" Joe S. <joes1234@gmail.com> --XYzZY Content-Disposition: form-data; name="text" Hello, I'm testing this email. Joe --XYzZY Content-Disposition: form-data; name="to" mb12345@parsetest.projectone.ca --XYzZY Content-Disposition: form-data; name="subject" Subject123 -
trying to POST multiple values of same parameter
Joe Sansalone replied to Joe Sansalone's topic in Cross-platform
OK, I got it to work via: tempBody := 'Param1=' + value1 + '&' + 'Param2=' + value2 + '&' ... etc; // build the parameters with & in-between each parameter RestRequest.Params.AddItem('Body1234', tempBody, pkREQUESTBODY, [poDoNotEncode]); // notice that there needs to be a unique name even for the entire body of parameters. -
trying to POST multiple values of same parameter
Joe Sansalone replied to Joe Sansalone's topic in Cross-platform
I understand. BUT, I need: MediaUrl=value1&MediaUrl=value2&MediaUrl=value3 same parameter multiple times. -
trying to POST multiple values of same parameter
Joe Sansalone replied to Joe Sansalone's topic in Cross-platform
I tried and it's not working. Is there a way to output the HTTP request text? The actual text that is being sent for the whole request? -
trying to POST multiple values of same parameter
Joe Sansalone replied to Joe Sansalone's topic in Cross-platform
ok, I'll try the parameterless AddItem function ... thanks. -
trying to POST multiple values of same parameter
Joe Sansalone replied to Joe Sansalone's topic in Cross-platform
The server is expecting same name parameter multiple times. But the TRestRequest.Params don't support adding the same parameter name again. -
I'm trying to add the same parameter name multiple times with different values (using POST). It seems like separating values via semi-colon ; and using poFlatArray only works for a GET request. FRestRequest.Params.AddItem('MediaUrl', values , TRestRequestParameterKind.pkGETorPOST, [poFlatArray]); Simply doing multiple AddItem erases previous entry if the parameter name is the same. So, How do I add the same parameter multiple times?
-
What's easier? Same Apple ID but developer access on 2 different App Store accounts? Or different Apple IDs - 1 for each different account?
-
ok great thanks!
-
Hi, I'll be developing an app with a different developer account in the same Delphi IDE. Does Delphi support multiple iOS developer accounts? I want to be sure before I try ... Joe
-
Ok, I'll try this out.
-
Thanks Sriram.
-
Hi, If I set a subscription active in a transaction and then execute "Select * from Table1", how do I check if a field has been updated, or row has been deleted or inserted (other than using IS Updated, or IS Inserted in the SQL). Is it a new property of TDataSet or TField?? Joe