jgomezal
jgomezal
CC#
Created by jgomezal on 8/23/2023 in #help
✅ An API refuses my Connection from MAC but not Windows.
I usually worked with arrays directly in PHP. I'm currently learning how to use better in both languages (C# and PHP) these definitions for Classes instead of Dictionaries and Arrays. To be honest, sometimes it is a bit complicated for me. This API (I mean, this post), requires a body with more than 2 hierarchy levels, so that's why I'm using a Dictionary, and an array, for finally building the JObject. But I will try to use this DTO for improving and learning.
31 replies
CC#
Created by jgomezal on 8/23/2023 in #help
✅ An API refuses my Connection from MAC but not Windows.
Manu thanks @TeBeClone ... I didn't know about the DTO concept. I already started with some modifications for using the await and async. I need to update some other sections before starting updating the DTO recommendations.
31 replies
CC#
Created by jgomezal on 8/23/2023 in #help
✅ An API refuses my Connection from MAC but not Windows.
Well, you are right. I need to check some of your points for learning because this is my first time with C#. The app works but I know I need to improve a lot my code and how I’m consuming the resources. I will review carefully your comments and see what else I can do. Thank you so much!!
31 replies
CC#
Created by jgomezal on 8/23/2023 in #help
✅ An API refuses my Connection from MAC but not Windows.
Thank you for this recommendation @Florian Voß
31 replies
CC#
Created by jgomezal on 8/23/2023 in #help
✅ An API refuses my Connection from MAC but not Windows.
Thank you so much! It helped me. I had to modify the Info.plist on my project to allow the unsecured connection to the HTTP, but only for a specific domain.
31 replies
CC#
Created by jgomezal on 8/23/2023 in #help
✅ An API refuses my Connection from MAC but not Windows.
Hello @Pobiega yes I read the message, that's why I tried using an HTTPS connection but the API doesn't have it. The strange point is that I'm receiving the error only from Mac. I'm not receiving the error from Windows even from Postman. This is why I decided to ask for help here.
31 replies
CC#
Created by jgomezal on 2/1/2023 in #help
❔ Calling files Path inside the project (MAC and Windows"
@Doombox I need to double-check with someone who use MAC for developing this. I cloned the repository and using a Windows machine to compile it and it worked without issues. So, thank you so much for all your help.
16 replies
CC#
Created by jgomezal on 2/1/2023 in #help
❔ Calling files Path inside the project (MAC and Windows"
On it. Let me try.
16 replies
CC#
Created by jgomezal on 2/1/2023 in #help
❔ Calling files Path inside the project (MAC and Windows"
16 replies
CC#
Created by jgomezal on 2/1/2023 in #help
❔ Calling files Path inside the project (MAC and Windows"
16 replies
CC#
Created by jgomezal on 2/1/2023 in #help
❔ Calling files Path inside the project (MAC and Windows"
No issue, if any question, just ask, because all the information is needed. Right now I have the application in this path: "/Users/juangomez/Downloads/Bodega/" I have the file.json in the same folder: "/Users/juangomez/Downloads/Bodega/"
16 replies
CC#
Created by jgomezal on 2/1/2023 in #help
❔ Calling files Path inside the project (MAC and Windows"
@Doombox In the debugging and release option, the solution you shared worked fine. However, I'm not sure what I'm doing wrong, because when I compiling the application, it doesn't matter the location of the folder, it's requesting for the files on my terminal homepage. "Unhandled exception. System.IO.FileNotFoundException: Could not find file '/Users/juangomez/file.json" Right now I have the application in the Downloads folder "/Users/juangomez/Downloads/Bodega/file.json"; The Path I used is: ".{separator}file.json";
16 replies
CC#
Created by jgomezal on 2/1/2023 in #help
❔ Calling files Path inside the project (MAC and Windows"
@Doombox linux and MAC use the same "/" separator. So, I guess this solution will help me. I will try it. Thanks a lot!
16 replies
CC#
Created by jgomezal on 1/28/2023 in #help
✅ [RESOLVED] Newtonsoft :: wrong serialization format
I need to practice that part to use classes for getting the objects as you recommend me.
19 replies
CC#
Created by jgomezal on 1/28/2023 in #help
✅ [RESOLVED] Newtonsoft :: wrong serialization format
To be honest, because I'm learning, and sometimes creating a lot of classes breaks my mind. But I will try to do it that way.
19 replies
CC#
Created by jgomezal on 1/28/2023 in #help
✅ [RESOLVED] Newtonsoft :: wrong serialization format
@Angius and @MODiX With the clarification about the object, I used this process: Instead of creating an string array, I created the JObject array, so, in the serialization step, it took it as an Object.
string operations = "{\"inumoper\": \"" + (this.orderNumber) + "\", \"itdoper\": \"ORD1\"}";
JObject[] operationsArray = new JObject[1];
operationsArray[0] = JObject.Parse(operations);
string operations = "{\"inumoper\": \"" + (this.orderNumber) + "\", \"itdoper\": \"ORD1\"}";
JObject[] operationsArray = new JObject[1];
operationsArray[0] = JObject.Parse(operations);
It worked as I expected.
19 replies
CC#
Created by jgomezal on 1/28/2023 in #help
✅ [RESOLVED] Newtonsoft :: wrong serialization format
Thank you so much. I will try.
19 replies