your assistance would be greatly appreciated, as this is currently hamstringing my development efforts
here are the details :
I am using version 0.0.38 of the servicestack-client package in an application based on the Vue.js App template.
here is an example of one of my messages :
this is what the model/dto behind the RecordType property looks like :
this is what the generated DTOS look like in my web project :
the code that executes the request looks like this :
at runtime the method is executed like this (drilled down to the "fetch" executed by the servicestack client in index.ts) :
when I look at the object transported over the wire using Fiddler, however - I don't see a payload :
this (obviously) results in a NULL RecordType property within the Service.
things I've tried :
- adding DataContract/DataMember attributes to the message / dto
- changing the casing of the properties on the message / DTO
- using a POST instead of a PUT
- Updating the servicestack client version (was originally 0.0.35)
What am I missing?
That's the browser making an
OPTIONS pre-flight CORS request, is your origin and destination server the same? or do you have CORS enabled?
CORS is enabled - server and client are on different hosts. I originally had the CORS enabled using the Plugin, but struggled with errors related to the Access-Control-Allow-Origin/Access-Control-Allow-Credentials values (which persisted even when setting the properties when adding the Plugin).
I am currently setting these manually as follows :
PS: I didn't think it would be CORS-related because other POST requests (without a payload) are eliciting a 200 Response :
removing the code above and adding with the following resolved the issue - thanks for pointing me in the right direction, Demis :