Comments (6)
I'm still thinking of a good architecture for this, without adding a parameter.
For example, setting it in the Engine subclass and all operations created on the Engine uses the same encoding.
from mknetworkkit.
So, if you wanted to do different requests with different content types, you'd use different engines?
from mknetworkkit.
MKNetworkEngine should be subclassed for every different server you connect to from your app.
How often would you have a server that uses different content type encoding for different end points?
Does that make sense or am I over assuming?
from mknetworkkit.
Um, in my case I have a server that has different content type... but I can just use different engines for each type, it'd be a simpler api.
from mknetworkkit.
Since current version of initWithURLString contains switch (self.postDataEncoding) and there is no dynamic way to set self.postDataEncoding, it seems like a potential API design issue or that I'm using (something) in wrong way.
Would prefer API extension, but updated docs are fine, too.
In case it makes any difference, I need to post json inside multipart.
from mknetworkkit.
same issue here ... I have one engine, one server, but depending on the method to post to, two different types of content-type to send. An additional helper method might be the only way, unfortunately :/
from mknetworkkit.
Related Issues (20)
- Previous credentials sent to authentication on IIS within 30 seconds even tried new credential.
- [MKNetworkOperation operationFailedWithError:][The network connection was lost.]
- -[MKNetworkEngine reachabilityChanged:] [Line 211] Server is not reachable
- mknetworkkit cocoapod install HOT 1
- Questions to version 2
- Post data format error
- Migration guide?? HOT 1
- Request to add a method to send parameter as array
- Getting more done in GitHub with ZenHub
- cannel all request
- Upload tasks from NSData are not supported in background sessions
- hi,how to support ipv6?
- have people know how to support ipv6,thx HOT 1
- is that support ipv6 of iOS? HOT 1
- method dateFromRFC1123() can not handle the date after 2038
- https
- https HOT 1
- UI API called on a background thread
- array activeTasks dont have lock
- How To Upgrade??
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mknetworkkit.